Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.
Edward Smale edited this page Oct 24, 2020 · 2 revisions

Only sent by the server to check if the connection to the client is still available and alive. Identified by the 0x0c opcode, it is a reliable packet that is imperative for the client to acknowledege. If the client repeatedly fails to acknowledge the packets, the server closes the connection with a Disconnect packet.

Name Type Description
Nonce uint16 The acknowledgement identifier for the payload, the integer is in Big Endian.`

Example parsing code

const opcode = reader.uint8();

if (opcode === Opcode.Ping) {
    const nonce = reader.uint16BE();
}

Example compose code

writer.uint8(0x0c);
writer.uint16BE(nonce);

Example packet

0000   0c 02 85                                          ...
Clone this wiki locally