Skip to main content
Module

x/cav/endpoint.ts>SocketSchema

A server framework for Deno
Go to Latest
interface SocketSchema
implements Omit<EndpointSchema, "maxBodySize" | "body">
import { type SocketSchema } from "https://deno.land/x/cav@0.2.0-alpha.7/endpoint.ts";

Schema options for creating a socket() handler.

Properties

optional
recv: Parser | null

Incoming message parser. Without this, received messages will be typed as unknown. When a message fails to parse, an error message will be sent back to the client.

optional
send: any

The type of message this Socket expects to send to a connected client. The value of this property doesn't matter, it's only used for the type.