Methods
client.connect(id: string): Promise<void>
Used to connect to another peer.
client.send(data: string | Buffer)
Used to send a message to the other peer, is stateless so should be used if getting a response back is not necessary.
client.close(data: string | Buffer)
Used to close the client and all the related sockets/listeners.
client.registerController(controller: Controller)
Used to register a controller, check the Controller section for more information.
Last updated