Skip to main content
Module

x/sockets/mod.ts

A WebSocket library for Deno.
Latest
import * as sockets from "https://deno.land/x/sockets@v0.5.0/mod.ts";

Classes

Channel represents channels, also known as "rooms". This class describes open channels, and is used to place clients into

The Client class represents a single end-user client. It contains information about their id, their web socket connection, and many more.

The EventEmitter class is responsible for the logic of sending and receiving messages. To do this, it aggregates information on clients, such as tracking how many clients are connected and what channels are open.

The Sender class is responsible for adding messages to the message queue, and then to work through the queue stack which will send the message.

The SocketServer class is responsible for creating a users socket server. Similar to how Drash.Http.Server creates a server instance.

The Transmitter class is used as the middleman between the client and server, when sending messages, to connect the 'wires' between them.