Socket IO lib
npm install @3kles/3kles-socketioThis package contains class to create sockets
IGenericMessage is a model to represent the message exchanged
- type?: string: Type of the message
- to?: string: Specify to who you want to send the message
- room?: string: Specific room where to send to the message
- content: any: Content of the message
IGenericSocket is a generic socket interface
- start(): Promise\
- getUsers(): Map
- addListener(listener?: { event: string, listener: (...args: any[]) => void }): void: To add a listener
```
npm install @3kles/3kles-socketio --save
How to create a socket
`javascript
const broker = await MessageBroker.getInstance();
const app = new GenericApp();
const server = app.startApp();
const genericSocket = new GenericSocket(broker, server);
await genericSocket.start();
`
Check the documentation` here.