mod.rs 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. /// Inbound connections session. Manages the creation of inbound sessions. Used
  2. /// to create an inbound session and start and stop the session.
  3. ///
  4. /// Class consists of 3 pointers: a weak pointer to the peer-to-peer class, an
  5. /// acceptor pointer, and a stoppable task pointer. Using a weak pointer to P2P
  6. /// allows us to avoid circular dependencies.
  7. pub mod inbound_session;
  8. /// Outbound connections session. Manages the creation of outbound sessions.
  9. /// Used to create an outbound session and stop and start the session.
  10. ///
  11. /// Class consists of a weak pointer to the peer-to-peer interface and a vector
  12. /// of outbound connection slots. Using a weak pointer to p2p allows us to avoid
  13. /// circular dependencies. The vector of slots is wrapped in a mutex lock. This
  14. /// is switched on everytime we instantiate a connection slot and insures that
  15. /// no other part of the program uses the slots at the same time.
  16. pub mod outbound_session;
  17. /// Seed connections session. Manages the creation of seed sessions. Used on
  18. /// first time connecting to the network. The seed node stores a list of other
  19. /// nodes in the network.
  20. pub mod seed_session;
  21. /// Defines methods that are used across sessions. Implements registering the
  22. /// channel and initializing the channel by performing a network handshake.
  23. pub mod session;
  24. pub use inbound_session::InboundSession;
  25. pub use outbound_session::OutboundSession;
  26. pub use seed_session::SeedSession;
  27. pub use session::Session;