Struct network::protocols::rpc::OutboundRpcs [−][src]
pub struct OutboundRpcs { /* fields omitted */ }Expand description
OutboundRpcs handles new outbound rpc requests made from the application layer.
There is one OutboundRpcs handler per Peer.
Implementations
pub fn new(
network_context: NetworkContext,
time_service: TimeService,
remote_peer_id: PeerId,
max_concurrent_outbound_rpcs: u32
) -> Self
pub async fn handle_outbound_request(
&mut self,
request: OutboundRpcRequest,
write_reqs_tx: &mut Sender<(NetworkMessage, Sender<Result<(), PeerManagerError>>)>
) -> Result<(), RpcError>
pub async fn handle_outbound_request(
&mut self,
request: OutboundRpcRequest,
write_reqs_tx: &mut Sender<(NetworkMessage, Sender<Result<(), PeerManagerError>>)>
) -> Result<(), RpcError>
Handle a new outbound rpc request from the application layer.
Method for Peer actor to drive the pending outbound rpc tasks forward.
The returned Future is a FusedFuture so it works correctly in a
futures::select!.
Handle a newly completed task from the self.outbound_rpc_tasks queue.
At this point, the application layer’s request has already been fulfilled;
we just need to clean up this request and update some counters.
Handle a new inbound RpcResponse message. If we have a pending request
with a matching request id in the pending_outbound_rpcs map, this will
trigger that corresponding task to wake up and complete in
handle_completed_request.
Auto Trait Implementations
impl !RefUnwindSafe for OutboundRpcs
impl Send for OutboundRpcs
impl !Sync for OutboundRpcs
impl Unpin for OutboundRpcs
impl !UnwindSafe for OutboundRpcs
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self