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) -> textpong. - JSON
{"method":"ping"}->{"pong":<ts>}wheretsis the server epoch millisecond timestamp.
ping (text)
ping
pong (text)
pong
ping (JSON)
{"method":"ping"}
pong (JSON)
{"pong": 1661856036925}