Skip to content

SlimIO/Socket

Repository files navigation

Socket

Built-in Socket Addon. This addon create a TCP/IP Socket server that will listen on 1337 (by default).

Getting Started

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.

Notes

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);

Dependencies

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)

License

MIT

About

Built-in Socket Addon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •