property WebSocketPluginOptions.idleTimeoutMs

Milliseconds of inbound silence after which a connection is closed with code 1001. 0 (the default) disables idle closing.

Requires WebSocketPluginOptions.heartbeatMs above 0, since the heartbeat tick is what performs the sweep. Configuring an idle timeout without a heartbeat throws at registration rather than silently doing nothing.

Type

number

Usage

import { type WebSocketPluginOptions } from "websocket-plugin/src/index.ts";