Struct packet_stream::PsOut [] [src]

pub struct PsOut<R: AsyncRead, W, B>(_);

Allows sending packets to the peer.

Methods

impl<R, W, B> PsOut<R, W, B> where
    R: AsyncRead,
    W: AsyncWrite,
    B: AsRef<[u8]>, 
[src]

[src]

Send a request to the peer.

The SendRequest Future must be polled to actually start sending the request. The InResponse Future can be polled to receive the response.

[src]

Create a PsDuplex, a bidirectional channel multiplexed over the underlying sink/stream pair.

[src]

Close the packet-stream, indicating that no more packets will be sent.

This does not immediately close if there are still unsent requests or active PsDuplexes. In that case, the closing happens when the last request is sent or the last duplex is closed.