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

x/sockets/mod.ts>Transmitter#startHeartbeat

A WebSocket library for Deno.
Latest
method Transmitter.prototype.startHeartbeat
import { Transmitter } from "https://deno.land/x/sockets@v0.5.0/mod.ts";

Start a heartbeat for the client in question.

Parameters

clientId: number
  • The WebSocket connection ID of the client in question.

Returns

number

The heartbeat ID. This is used to clear a heartbeat in timeoutPing().