Skip to main content
Module

x/cav/ws.ts>webSocket

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

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.

Type Parameters

optional
Send = any
optional
Recv = any

Parameters

input: WebSocket | string
optional
init: WSInit<Recv>