Ping
Configuration 0x05, server → client.
config · 0x05 · clientbound (server → client)
Ping in the configuration state with an arbitrary id. The client answers with Pong carrying the same id. It is used for ordering and latency checks, not for keep-alive.
Sent by the server, read by the client. Listen for it with client.on("Ping", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
id |
Int |
Send it
await client.sendPacket("Ping", {
id: 42,
});
The client answers with Pong carrying the same signed 32-bit id. Use it for an ordering or latency probe, not as a replacement for KeepAlive.
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/config/clientbound/Ping.ts