Struct fizyr_rpc::PeerReadHandle [−][src]
pub struct PeerReadHandle<Body> { /* fields omitted */ }
Expand description
Handle to receive messages from a peer.
The read handle can be used to receive incoming requests and stream messages.
When all read and write handles are dropped, the peer loop is stopped. Any open requests will also be terminated.
Implementations
Receive the next request or stream message from the remote peer.
Errors for invalid incoming messages are also reported by this function. For example: incoming update messages that are not associated with a received request will be reported as an error here.
Make a close handle for the peer.
The close handle can be used to close the connection with the remote peer. It can be cloned and moved around independently.