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

x/danet/src/router/websocket/router.ts>WebSocketRouter

The most mature backend framework for Deno. Create awesome HTTP and WebSocket server as well as KVQueue workers !
Latest
class WebSocketRouter
import { WebSocketRouter } from "https://deno.land/x/danet@2.4.1/src/router/websocket/router.ts";

Constructors

new
WebSocketRouter(
injector: Injector,
guardExecutor?: GuardExecutor,
filterExecutor?: FilterExecutor,
router: Application,
middlewareExecutor?,
)

Methods

private
handleConnectionRequest(topicRouter: SmartRouter<unknown>, Controller: Constructor)
private
onConnection(
executionContext: ExecutionContext,
Controller: Constructor,
socket: WebSocket,
)
private
onMessage(
topicRouter: SmartRouter<unknown>,
Controller: Constructor,
controllerInstance: any,
socket: WebSocket,
)
private
registerTopic(
methods: string[],
Controller: Constructor,
topicRouter: SmartRouter<unknown>,
)
registerController(Controller: Constructor, endpoint: string)