ping

The ping message is sent periodically to help confirm that the receiving peer is still connected. If a TCP/IP error is encountered when sending the “ping” message (such as a connection timeout), the transmitting node can assume that the receiving node is disconnected. The response to a “ping” message is the “pong” message.

The message includes a single field, the nonce.

Name

Data Type

Bytes

Description

nonce

uint64

8

Random nonce assigned to this “ping” message. The responding “pong” message will include this nonce to identify the “ping” message to which it is replying. See BIP-31 for details.

The annotated hexdump below shows a “ping” message. (The message header has been omitted.)

0094102111e2af4d ... Nonce