Move server.rs to connection.rs and change imports.
This commit is contained in:
parent
77ad61331c
commit
7cc44f4fa9
|
@ -2,20 +2,20 @@
|
||||||
|
|
||||||
/// Handles outbound requests from our node to the network.
|
/// Handles outbound requests from our node to the network.
|
||||||
mod client;
|
mod client;
|
||||||
|
/// The per-peer connection state machine.
|
||||||
|
mod connection;
|
||||||
/// Wrapper around handshake logic that also opens a TCP connection.
|
/// Wrapper around handshake logic that also opens a TCP connection.
|
||||||
mod connector;
|
mod connector;
|
||||||
/// Peer-related errors.
|
/// Peer-related errors.
|
||||||
mod error;
|
mod error;
|
||||||
/// Performs peer handshakes.
|
/// Performs peer handshakes.
|
||||||
mod handshake;
|
mod handshake;
|
||||||
/// Handles inbound requests from the network to our node.
|
|
||||||
mod server;
|
|
||||||
|
|
||||||
use client::ClientRequest;
|
use client::ClientRequest;
|
||||||
use error::ErrorSlot;
|
use error::ErrorSlot;
|
||||||
|
|
||||||
pub use client::Client;
|
pub use client::Client;
|
||||||
|
pub use connection::Connection;
|
||||||
pub use connector::Connector;
|
pub use connector::Connector;
|
||||||
pub use error::{HandshakeError, PeerError, SharedPeerError};
|
pub use error::{HandshakeError, PeerError, SharedPeerError};
|
||||||
pub use handshake::Handshake;
|
pub use handshake::Handshake;
|
||||||
pub use server::Connection;
|
|
||||||
|
|
|
@ -194,9 +194,9 @@ where
|
||||||
|
|
||||||
let (peer_tx, peer_rx) = stream.split();
|
let (peer_tx, peer_rx) = stream.split();
|
||||||
|
|
||||||
use super::server;
|
use super::connection;
|
||||||
let server = Connection {
|
let server = Connection {
|
||||||
state: server::State::AwaitingRequest,
|
state: connection::State::AwaitingRequest,
|
||||||
svc: internal_service,
|
svc: internal_service,
|
||||||
client_rx: server_rx,
|
client_rx: server_rx,
|
||||||
error_slot: slot,
|
error_slot: slot,
|
||||||
|
|
Loading…
Reference in New Issue