Skip to main content
Module

x/cav/socket.ts>Socket

A server framework for Deno
Go to Latest
type alias Socket
import { type Socket } from "https://deno.land/x/cav@0.2.3/socket.ts";

Cav endpoint handler for connecting web sockets.

Type Parameters

Schema extends SocketSchema | null
definition: (Schema extends null ? { } : Schema) & ((req: EndpointRequest<{ socket: true; query: (Schema extends { query: Parser; } ? ParserInput<Schema["query"]> : QueryRecord | undefined); body: (Schema extends { body: Parser; } ? ParserInput<Schema["body"]> : undefined); result: WS<(Schema extends { recv: Parser; } ? ParserInput<Schema["recv"]> : unknown), (Schema extends SocketSchema ? ("send" extends keyof Schema ? Schema["send"] : unknown) : unknown)>; }>, conn: http.ConnInfo) => Promise<Response>)