Module darkfi::net::session

source ·
Expand description

Defines the interaction between nodes during a connection. Consists of an inbound session, which describes how to set up an incoming connection, and an outbound session, which describes setting up an outbound connection. Also describes the sesd session, which is the type of connection used when a node connects to the network for the first time. Implements the Session trait which describes the common functions across all sessions.

Re-exports§

Modules§

  • Inbound connections session. Manages the creation of inbound sessions. Used to create an inbound session and start and stop the session.
  • Manual connections session. Manages the creation of manual sessions. Used to create a manual session and to stop and start the session.
  • Outbound connections session. Manages the creation of outbound sessions. Used to create an outbound session and to stop and start the session.
  • RefineSession manages the GreylistRefinery, which randomly selects entries on the greylist and updates them to whitelist if active,
  • Seed sync session creates a connection to the seed nodes specified in settings. A new seed sync session is created every time we call P2p::start(). The seed sync session loops through all the configured seeds and creates a corresponding Slot. Slot’s are started, but sit in a suspended state until they are activated by a call to notify (see: p2p.seed()).

Constants§

Traits§

  • Session trait. Defines methods that are used across sessions. Implements registering the channel and initializing the channel by performing a network handshake.

Functions§

  • Removes channel from the list of connected channels when a stop signal is received.

Type Aliases§