Skip to main content
Module

x/cav/ws.ts

A server framework for Deno
Go to Latest
import * as cav from "https://deno.land/x/cav@0.0.24/ws.ts";

Functions

Wraps a WebSocket instance with added serialization functionality and E2E type support. If the input is a string, the wrapped WebSocket will be created with the given URL.

Interfaces

Isomorphic WebSocket interface with JSON serialization and typed messages.

Initializer options for the webSocket() function.

Type Aliases

Type that matches any socket. Useful for type constraints.

Listener for a Socket's "close" event.

Listener for a web socket's "error" event.

Listener for a web socket's "message" event. The message is deserialized from the event data.

Listener for a Socket's "open" event.