property WebSocketPluginOptions.heartbeatMs

Interval in milliseconds at which WebSocketPluginOptions.heartbeatPayload is sent to every open connection. 0 (the default) disables the heartbeat entirely and creates no timer.

The heartbeat is an application-level message, not an RFC 6455 ping frame: the web WebSocket API exposed by Deno and Cloudflare Workers has no ping(), so a protocol ping would silently no-op on half the supported runtimes.

Type

number

Usage

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