Skip to main content

Heartbeat

The client sends a heartbeat periodically (recommended every <= 30s); the connection is disconnected on idle timeout. Two forms are accepted:

  • Text ping (case-insensitive) -> text pong.
  • JSON {"method":"ping"} -> {"pong":<ts>} where ts is the server epoch millisecond timestamp.

ping (text)

ping

pong (text)

pong

ping (JSON)

{"method":"ping"}

pong (JSON)

{"pong": 1661856036925}