Crate packet_stream [] [src]

Implements the packet-stream protocol in rust.

Structs

DecodedPacket

A packet decoded an AsyncRead.

InRequest

A request initated by the peer. Drop to ignore it, or use respond to send a response.

InResponse

A response that will be received from 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.

SendRequest

A request initated by this packet-stream.

SendResponse

Future that completes when the given bytes have been sent as a response to the peer.

SendResponseError

Future that completes when the given bytes have been sent as a response to the peer, with the error flag set.

Enums

IncomingPacket

An incoming packet, initiated by the peer.

PsPacketType

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.