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]

[src]

Create a new Receiver using the specified Reader.

[src]

Returns a reference to the underlying Reader.

[src]

Returns a mutable reference to the underlying Reader.

impl Receiver<WebSocketStream>
[src]

[src]

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

[src]

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

[src]

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]

[src]

Reads a single data frame from the remote endpoint.

[src]

Returns the data frames that constitute one message.

[src]

Returns an iterator over incoming data frames.

[src]

Reads a single message from this receiver.

[src]

Returns an iterator over incoming messages.