pub struct RpcServer { /* private fields */ }Expand description
RPC server for handling incoming calls
Implementations§
Source§impl RpcServer
impl RpcServer
Sourcepub fn new(endpoint_id: EndpointId) -> Self
pub fn new(endpoint_id: EndpointId) -> Self
Create new RPC server
Sourcepub fn register_service(&self, service: Box<dyn RpcService>)
pub fn register_service(&self, service: Box<dyn RpcService>)
Register a service
Sourcepub fn process_requests(&self) -> Result<(), RpcError>
pub fn process_requests(&self) -> Result<(), RpcError>
Process incoming RPC requests (call in a loop)
Receives one request, dispatches to appropriate service, and sends response.