Struct packet_stream::InRequest
[−]
[src]
pub struct InRequest<W, B> { /* fields omitted */ }
A request initated by the peer. Drop to ignore it, or use respond
to send
a response.
Methods
impl<W, B> InRequest<W, B>
[src]
fn packet(&self) -> &DecodedPacket
[src]
Returns the packet corresponding to this incoming request.
impl<W: AsyncWrite, B: AsRef<[u8]>> InRequest<W, B>
[src]
fn respond(self, bytes: B, t: PsPacketType) -> SendResponse<W, B>
[src]
Returns a Future which completes once the given packet has been sent to the peer.
fn respond_error(self, bytes: B, t: PsPacketType) -> SendResponseError<W, B>
[src]
Returns a Future which completes once the given packet has been sent to the peer. The error flag is set in the header.