From 6043eea87551e18364b25d15283d36dfa32522da Mon Sep 17 00:00:00 2001 From: Levi0804 Date: Fri, 26 Dec 2025 15:54:23 +0530 Subject: [PATCH] improve heartbeat mechanism docs --- docs/categories/08-Miscellaneous/eio-protocol.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/categories/08-Miscellaneous/eio-protocol.md b/docs/categories/08-Miscellaneous/eio-protocol.md index ff8f9f6f..e04cae35 100644 --- a/docs/categories/08-Miscellaneous/eio-protocol.md +++ b/docs/categories/08-Miscellaneous/eio-protocol.md @@ -234,12 +234,16 @@ CLIENT SERVER │ *** Handshake *** │ │ │ - │ ◄───────────────────────────────────────────────── │ + │ GET /engine.io/?EIO=4&transport=polling&sid=... │ + │ ─────────────────────────────────────────────────► │ + │ ◄────────────────────────────────────────────────┘ │ │ 2 │ (ping packet) │ ─────────────────────────────────────────────────► │ │ 3 │ (pong packet) ``` +The client now starts polling the server again (to start receiving the `ping` packet), and includes the `sid` (sent in the handshake process) query parameter in all subsequent requests. + At a given interval (the `pingInterval` value sent in the handshake) the server sends a `ping` packet and the client has a few seconds (the `pingTimeout` value) to send a `pong` packet back. If the server does not receive a `pong` packet back, then it SHOULD consider that the connection is closed.