This module implements the
The ping protocol can be used as a simple application-layer health check
for connections of any
Transport as well as to measure and record
Ping struct implements the
NetworkBehaviour trait. When used with a
it will respond to inbound ping requests and as necessary periodically send outbound
ping requests on every established connection. If a configurable number of pings fail,
the connection will be closed.
Ping network behaviour produces
PingEvents, which may be consumed from the
by an application, e.g. to collect statistics.
Note: The ping protocol does not keep otherwise idle connections alive, it only adds an additional condition for terminating the connection, namely a certain number of failed ping requests.
Event generated by the