GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
If nothing happens, download the GitHub extension for Visual Studio and try again.
A blazing fast low-level WebSocket server based on turbo-net.
npm
yarn
Let’s get started by creating a WebSocket server:
listener. The callback will contain a
and a
object:
method and run your Node app:
Sends data to the client. Depending on the type of the passed object, it will send the data in one or multiple frames:
Node’s Buffers get sent as binary data and may be sent in multiple frames.
Sends a ping frame that may contain a payload. The client must send a Pong frame with the same payload in response. Check the
method for more details.
Closes the connection.
Sends data to all the clients. Follows the same logic as
Get an unordered array containing the current active connections.
that will get completed when all the connections are closed.
are EventEmitters, so you can listen to these events:
, where the first is a turbo-net Connection and the later is a turbo-http Request object. Check out their docs to see what fields and methods are available.
Emitted when the…