Move server.rs to connection.rs and change imports.

This commit is contained in:
Henry de Valence 2020-01-15 19:39:53 -08:00 committed by Deirdre Connolly
parent 77ad61331c
commit 7cc44f4fa9
3 changed files with 5 additions and 5 deletions

View File

@ -2,20 +2,20 @@
/// Handles outbound requests from our node to the network.
mod client;
/// The per-peer connection state machine.
mod connection;
/// Wrapper around handshake logic that also opens a TCP connection.
mod connector;
/// Peer-related errors.
mod error;
/// Performs peer handshakes.
mod handshake;
/// Handles inbound requests from the network to our node.
mod server;
use client::ClientRequest;
use error::ErrorSlot;
pub use client::Client;
pub use connection::Connection;
pub use connector::Connector;
pub use error::{HandshakeError, PeerError, SharedPeerError};
pub use handshake::Handshake;
pub use server::Connection;

View File

@ -194,9 +194,9 @@ where
let (peer_tx, peer_rx) = stream.split();
use super::server;
use super::connection;
let server = Connection {
state: server::State::AwaitingRequest,
state: connection::State::AwaitingRequest,
svc: internal_service,
client_rx: server_rx,
error_slot: slot,