1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub(crate) mod connection_acceptor;
pub(crate) mod connection_server;
pub(crate) mod error;
pub(crate) mod listener_server;

pub use connection_server::ConnectionServer;
pub use connection_server::ServerConnector;
pub use error::Error;
pub use error::Result;
pub use listener_server::Server;

pub(crate) fn interrupted(err: &std::io::Error) -> bool {
    err.kind() == std::io::ErrorKind::Interrupted
}

pub(crate) fn would_block(err: &std::io::Error) -> bool {
    err.kind() == std::io::ErrorKind::WouldBlock
}