Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/denocg/server/mod.ts>Server

[Experimental / PoC] Create broadcast graphics using Deno and a browser (a NodeCG alternative)
Latest
interface Server
import { type Server } from "https://deno.land/x/denocg@v0.0.8/server/mod.ts";

Methods

getReplicant<TKey extends ReplicantName<TDef>>(name: TKey): Replicant<ReplicantType<TDef, TKey>>
broadcastMessage<TKey extends MessageName<TDef>>(...unnamed 0: MessageParams<TDef, TKey> extends undefined ? [TKey, undefined] : [TKey, MessageParams<TDef, TKey>]): void
addMessageListener<TKey extends MessageName<TDef>>(name: TKey, listener: MessageListener<TDef, TKey>): void
removeMessageListener<TKey extends MessageName<TDef>>(name: TKey, listener: MessageListener<TDef, TKey>): void
registerRequestHandler<TKey extends RequestName<TDef>>(
name: TKey,
handler: RequestHandler<TDef, TKey>,
overwrite?: boolean,
): void
unregisterRequestHandler<TKey extends RequestName<TDef>>(name: TKey, handler: RequestHandler<TDef, TKey>): void