pub trait Server {
    const NAME: &'static str;

    fn handle_connection(
        &self,
        conn: TcpStream
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>; }
Expand description

A server handles incoming network connections.

Required Associated Constants§

Returns the name of the connection handler for use in e.g. log messages.

Required Methods§

Handles a single connection.

Implementations on Foreign Types§

Implementors§