Handles the /ipfs/ping/1.0.0
protocol. This allows pinging a remote node and waiting for an
answer.
Usage
The Ping
struct implements the NetworkBehaviour
trait. When used, it will automatically
send a periodic ping to nodes we are connected to. If a remote doesn't answer in time, it gets
automatically disconnected.
The Ping
struct is also what handles answering to the pings sent by remotes.
When a ping succeeds, a PingSuccess
event is generated, indicating the time the ping took.