Skip to main content
13

PINGRESP

0xD0Server to Client

Fixed header flags: 0000 – all flags reserved

PINGRESP is the broker's response to PINGREQ. Like PINGREQ, it is exactly 2 bytes: 0xD0 0x00. No payload, no variable header. If a client sends PINGREQ and does not receive PINGRESP within a reasonable timeout, it should close and reopen the network connection.

Details

PINGRESP is the broker's proof-of-life response. The packet is always 2 bytes: 0xD0 0x00.

If the client does not receive PINGRESP within a reasonable time after PINGREQ, the spec recommends the client close the network connection. A missing PINGRESP indicates either the broker is overloaded or the connection has silently failed (a common scenario with NAT and firewalls that expire TCP state without sending RST).

Brokers may also send PINGRESP unsolicited in some implementations, but per spec it is only sent in response to PINGREQ.

Fixed Header

FieldValue
Packet type (bits 7–4)13 (1101₂)
First byte (hex)0xD0
Flags (bits 3–0)0000 – all flags reserved
QoS bits applyNo
Directionserver-to-client
Added inMQTT 3.1

See Also