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§
Sourcefn next_client(&self) -> Result<(), Error>
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§
fn handle_connection(&self) -> Result<(), Error>
👎Deprecated: use
next_client()