Function tokio_rpc::serve [] [src]

pub fn serve<T>(addr: SocketAddr, new_service: T) where
    T: NewService<Request = Vec<u8>, Response = Vec<u8>, Error = Error> + Send + Sync + 'static, 

Start a server, listening for connections on addr.

For each new connection, new_service will be used to build a Service instance to process requests received on the new connection.

This function will block as long as the server is running.