Built-in Socket Addon. This addon create a TCP/IP Socket server that will listen on 1337
(by default).
This package is available in the SlimIO Package Registry and can be easily installed with SlimIO CLI.
$ slimio --add socket
# or
$ slimio --add https://github.com/SlimIO/Socket
Note: this addon is automatically installed with the slimio -i command.
To be able to communicate with the product externally, please use the official Tcp-SDK package.
const TcpSdk = require("@slimio/tcp-sdk");
async function main() {
const client = new TcpSdk();
await client.once("connect", 1000);
const info = await client.sendOne("cpu.get_info");
console.log(info);
client.close();
}
main().catch(console.error);
Name | Refactoring | Security Risk | Usage |
---|---|---|---|
@slimio/addon | Minor | Low | Addon Container |
@slimio/config | Minor | Medium | Configuration loader |
bytes | Minor | Low | Utility to parse a string bytes (ex: 1TB) to bytes (1099511627776) and vice-versa |
secure-json-parse | Minor | Low | Safe JSON Parse (no prototype pollution) |
MIT