import { Channel } from "https://deno.land/x/sockets@v0.5.0/src/channel.ts";
Channel represents channels, also known as "rooms". This class describes open channels, and is used to place clients into
Properties
The callbacks for listening
function handleChannel1 (...) { ... }
socketServer.on("channel 1", handleChannel1)
handleChannel1
is now registered as a callback.
listeners: Map<number, WebSocket>
Acts as the list of clients connected to the channel. A listener would contain the clients socket id and and the socket connection sent across
new Channel("channel 1").listeners.set(
2, // clients socket id
incomingSocketConnection
})