Ping
Play 0x3D, server → client.
play · 0x3D · clientbound (server → client)
Sends a ping with an int id that the client must answer with a serverbound Pong containing the same id. The server can use it to wait for the client to process all earlier packets. The client responds immediately.
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: /* Int */,
});
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/play/clientbound/Ping.ts