Module darkfi::net::session::outbound_session

source ·
Expand description

Outbound connections session. Manages the creation of outbound sessions. Used to create an outbound session and to stop and start the session.

Class consists of a weak pointer to the p2p interface and a vector of outbound connection slots. Using a weak pointer to p2p allows us to avoid circular dependencies. The vector of slots is wrapped in a mutex lock. This is switched on every time we instantiate a connection slot and insures that no other part of the program uses the slots at the same time.


  • Defines outbound connections session.
  • Main PeerDiscovery process that loops through connected channels and sends out a GetAddrs when it is active. If there are no connected channels after two attempts, connect to our seed nodes and perform SeedSyncSession.
  • Slot 🔒


Type Aliases§