Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/lib.deno.d.ts>Deno.UpgradeWebSocketOptions

A JavaScript extension package for building strong and modern applications.
Latest
interface Deno.UpgradeWebSocketOptions
import { type Deno } from "https://deno.land/x/ayonli_jsext@v0.9.72/lib.deno.d.ts";
const { UpgradeWebSocketOptions } = Deno;

Options which can be set when performing a Deno.upgradeWebSocket upgrade of a Request

Properties

optional
protocol: string

Sets the .protocol property on the client side web socket to the value provided here, which should be one of the strings specified in the protocols parameter when requesting the web socket. This is intended for clients and servers to specify sub-protocols to use to communicate to each other.

optional
idleTimeout: number

If the client does not respond to this frame with a pong within the timeout specified, the connection is deemed unhealthy and is closed. The close and error event will be emitted.

The unit is seconds, with a default of 120. Set to 0 to disable timeouts.