Skip to main content

Module peer_pool

Module peer_pool 

Source

Structs§

PeerPool

Enums§

PeerEvent
Peer-lifecycle events. Each registered listener receives every event independently.
PeerEventTopic
Topic key for the peer-lifecycle event emitter.

Functions§

new_conn_wins 🔒
Decides whether a new connection to a peer replaces the one already in the pool. When two nodes dial each other at the same time, each sees both connections in opposite directions. Both keep the one dialed by the node with the smaller PeerID, so they keep the same connection. Two connections in the same direction keep the first.

Type Aliases§

PeerEventListener
Listener returned by register_peer_events.