Struct websocket::receiver::Receiver [] [src]

pub struct Receiver<R> { /* fields omitted */ }

A Receiver that wraps a Reader and provides a default implementation using DataFrames and Messages.

Methods

impl<R> Receiver<R> where
    R: Read
[src]

Create a new Receiver using the specified Reader.

Returns a reference to the underlying Reader.

Returns a mutable reference to the underlying Reader.

impl Receiver<WebSocketStream>
[src]

Closes the receiver side of the connection, will cause all pending and future IO to return immediately with an appropriate value.

Shuts down both Sender and Receiver, will cause all pending and future IO to return immediately with an appropriate value.

Changes whether the receiver is in nonblocking mode.

If it is in nonblocking mode and there is no incoming message, trying to receive a message will return an error instead of blocking.

Trait Implementations

impl<R: Read> Receiver<DataFrame> for Receiver<R>
[src]

Reads a single data frame from the remote endpoint.

Returns the data frames that constitute one message.

Returns an iterator over incoming data frames.

Reads a single message from this receiver.

Returns an iterator over incoming messages.