import { Client } from "https://deno.land/x/sockets@v0.5.0/mod.ts";
The Client class represents a single end-user client. It contains information about their id, their web socket connection, and many more.
Constructors
new
Client(id: number, socket: WebSocket)Construct an object of this class.
Properties
The heartbeat_id
is the same as the id
. It is used to 'poll' the
client, to check if the connection is alive.
The clients id, which is the id of the socket connection sent across.
const clientId = conn.rid;
socket: WebSocket
The web socket connection for the client.