quic_rpc::server

Function run_server_loop

Source
pub async fn run_server_loop<S, C, T, F, Fut>(
    _service_type: S,
    conn: C,
    target: T,
    handler: F,
) -> Result<(), RpcServerError<C>>
where S: Service, C: Listener<S>, T: Clone + Send + 'static, F: FnMut(RpcChannel<S, C>, S::Req, T) -> Fut + Send + 'static, Fut: Future<Output = Result<(), RpcServerError<C>>> + Send + 'static,
Expand description

Run a server loop, invoking a handler callback for each request.

Requests will be handled sequentially.