Type Alias libp2p_request_response::RequestResponseEvent
source ยท pub type RequestResponseEvent<TRequest, TResponse> = Event<TRequest, TResponse>;
๐Deprecated since 0.24.0: Use re-exports that omit
RequestResponse
prefix, i.e. libp2p::request_response::Event
Aliased Typeยง
enum RequestResponseEvent<TRequest, TResponse> {
Message {
peer: PeerId,
message: Message<TRequest, TResponse>,
},
OutboundFailure {
peer: PeerId,
request_id: RequestId,
error: OutboundFailure,
},
InboundFailure {
peer: PeerId,
request_id: RequestId,
error: InboundFailure,
},
ResponseSent {
peer: PeerId,
request_id: RequestId,
},
}
Variantsยง
Message
An incoming message (request or response).
Fields
OutboundFailure
An outbound request failed.
Fields
ยง
error: OutboundFailure
The error that occurred.
InboundFailure
An inbound request failed.
Fields
ยง
error: InboundFailure
The error that occurred.
ResponseSent
A response to an inbound request has been sent.
When this event is received, the response has been flushed on the underlying transport connection.