You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ZMTP 3.1 adds PING/PONG commands as heartbeat options that libzmq implements. The PING commands can add a context following the TTL (an arbitrary payload) which the PONG is supposed to echo back, but libzmq does not implement this.
To invoke a single heartbeat, the peer MAY, at any point after the security handshake is complete, send a PING command:
The ping-ttl is a 16-bit unsigned integer in network order that MAY be zero or MAY contain a time-to-live measured in tenths of seconds. The ping-ttl provides a strong hint to the other peer to disconnect if no further traffic is received after that time. The maximum TTL is 6553 seconds.
When a peer receives a PING command it SHALL respond with a PONG command that echoes the ping-context, which may be empty:
What's the purpose of echoing the TTL back? One thing I thought could be neat is to use it to provide an estimate of the latency between the peers, to use as a weight in or alternative to the RR behavior.
It's not the TTL that's echoed back, it's an arbitrary content. I'm working on that, but I'll probably change the RFC to limit it - at the moment there's no size limit which might open it to abuse.
ZMTP 3.1 adds PING/PONG commands as heartbeat options that libzmq implements. The PING commands can add a context following the TTL (an arbitrary payload) which the PONG is supposed to echo back, but libzmq does not implement this.
https://rfc.zeromq.org/spec:37/ZMTP
The text was updated successfully, but these errors were encountered: