Skip to main content
Module

x/cav/mod.ts>WSInit

A server framework for Deno
Go to Latest
interface WSInit
import { type WSInit } from "https://deno.land/x/cav@0.2.0-alpha.7/mod.ts";

Initializer options for the webSocket() function.

Type Parameters

optional
Recv = any

Properties

optional
recv: Parser<any, Recv> | null

For parsing received messages before calling any registered message listeners. If this is omitted, messages will be passed through to listeners without parsing, typed as any. If this parser returns undefined, no message event will be triggered.