Crate libp2p_ping
source ·Expand description
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.
Modules
Structs
Network behaviour that handles receiving pings sent by other nodes and periodically pings the
nodes we are connected to.
Enums
Event generated by the
Ping
behaviour.