Module 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§

pub use inbound_session::InboundSession;
pub use inbound_session::InboundSessionPtr;
pub use manual_session::ManualSession;
pub use manual_session::ManualSessionPtr;
pub use outbound_session::OutboundSession;
pub use outbound_session::OutboundSessionPtr;
pub use seedsync_session::SeedSyncSession;
pub use seedsync_session::SeedSyncSessionPtr;
pub use refine_session::RefineSession;
pub use refine_session::RefineSessionPtr;

Modules§

inbound_session
Inbound connections session. Manages the creation of inbound sessions. Used to create an inbound session and start and stop the session.
manual_session
Manual connections session. Manages the creation of manual sessions. Used to create a manual session and to stop and start the session.
outbound_session
Outbound connections session. Manages the creation of outbound sessions. Used to create an outbound session and to stop and start the session.
refine_session
RefineSession manages the GreylistRefinery, which randomly selects entries on the greylist and updates them to whitelist if active,
seedsync_session
Seed sync session creates a connection to the seed nodes specified in settings.

Constants§

SESSION_ALL
SESSION_DEFAULT
SESSION_INBOUND
SESSION_MANUAL
SESSION_OUTBOUND
SESSION_REFINE
SESSION_SEED

Traits§

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

Functions§

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

Type Aliases§

SessionBitFlag
Bitwise selectors for the protocol_registry
SessionWeakPtr