Server

Trait Server 

Source
pub trait Server {
    // Required method
    fn next_client(&self) -> Result<(), Error>;

    // Provided method
    fn handle_connection(&self) -> Result<(), Error> { ... }
}
Expand description

ABCI Server handle.

Use Server::handle_connection() to accept connection and process all traffic in this connection. Each incoming connection will be processed using app.

Required Methods§

Source

fn next_client(&self) -> Result<(), Error>

Process one incoming connection.

Returns when the connection is terminated, CancellationToken::cancel() is called or RequestDispatcher returns None.

It is safe to call this method multiple times after it finishes; however, errors must be examined and handled, as the connection should not terminate. One exception is Error::Cancelled, which means server shutdown was requested.

Provided Methods§

Source

fn handle_connection(&self) -> Result<(), Error>

👎Deprecated: use next_client()

Implementors§