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

x/websocket_broadcastchannel/src/serve-web-socket.ts

Host-wide BroadcastChannel for Deno CLI, backed by WebSockets.
Latest
import * as websocketBroadcastchannel from "https://deno.land/x/websocket_broadcastchannel@0.8.0/src/serve-web-socket.ts";

Functions

A default handler for requests that are not handled by a ServeWebSocketHandler.

Returns whether the given request is a WebSocket upgrade request. Does not care about the method or URL of the request.

Like Deno.serve, but with a ServeWebSocketHandler that will be called for any WebSocket that reaches the "open" state.

Type Aliases

Will be called when a newly connected WebSocket emits the "open" event.

Options for serveWebSocket.

Options with TLS for serveWebSocket.

A predicate that determines whether a request should be handled by a ServeWebSocketHandler.