Enum packet_stream::IncomingPacket
[−]
[src]
pub enum IncomingPacket<R: AsyncRead, W: AsyncWrite, B: AsRef<[u8]>> { Request(PeerRequest<W, B>), Duplex(PsSink<W, B>, PsStream<R>), }
An incoming packet, initiated by the peer.
The enum variants carry values that allow interacting with the peer.
Variants
Request(PeerRequest<W, B>)
An incoming request. You get an PeerRequest
, the peer got a
Request
and an Response
.
Duplex(PsSink<W, B>, PsStream<R>)
A duplex connection initiated by the peer. Both peers get a PsSink
and
a PsStream
.