Crate packet_stream [−] [src]
Implements the packet-stream protocol in rust.
Structs
Closed |
A future that emits the wrapped writer of a packet-stream once the outgoing half of the stream has been fully closed. |
InRequest |
A request initated by the peer. Drop to ignore it, or use |
InResponse |
A response that will be received from the peer. |
Metadata |
The metadata associated with a packet. |
OutRequest |
An outgoing request, initated by this packet-stream. |
OutResponse |
Future that completes when the response has been sent to the peer. |
PsIn |
A stream of incoming requests from the peer. |
PsOut |
Allows sending packets to the peer. |
PsSink |
The sink half of a duplex multiplexed over the packet-stream. |
PsStream |
The stream half of a duplex multiplexed over the packet-stream. |
Enums
ConnectionError |
An error indicating what happend on a connection. |
IncomingPacket |
An incoming packet, initiated by the peer. |
PacketType |
An enumeration representing the different types a packet can have. |
Functions
packet_stream |
Take ownership of an AsyncRead and an AsyncWrite to create the two halves of a packet-stream, as well as a future for notification when the packet-stream has been fully closed. |