Skip to content

Commit

Permalink
add module docs for connection and manager
Browse files Browse the repository at this point in the history
  • Loading branch information
mycognosist committed Oct 17, 2023
1 parent 71750cc commit 0c7a182
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions solar/src/actors/network/connection.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//! Handle inbound and outbound TCP connections.
//!
//! Inbound connections originate in the TCP server module, while outbound
//! connection attempts are intiated by the connection scheduler module.
//!
//! Connection events are emitted and handled by the connection manager.
use std::fmt::Display;

use async_std::net::TcpStream;
Expand Down
11 changes: 11 additions & 0 deletions solar/src/actors/network/connection_manager.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//! Event-driven connection manager.
//!
//! The connection manager serves to register new TCP connections and handle
//! each connection as it passes through several phases (eg. connection
//! establishment, handshake, replication etc.).
//!
//! An event loop listens for connection events and executes handlers for each.
//!
//! Connection data, including the underlying TCP stream, is passed around with
//! each event variant - allowing the handlers to take ownership of the data.
use std::{collections::HashSet, net::Shutdown};

use async_std::{
Expand Down

0 comments on commit 0c7a182

Please sign in to comment.