Struct websockets::WebSocketReadHalf[][src]

pub struct WebSocketReadHalf { /* fields omitted */ }
Expand description

The read half of a WebSocket connection, generated from WebSocket::split(). This half can only receive frames.

Implementations

Receives a Frame over the WebSocket connection.

If the received frame is a Ping frame, an event to send a Pong frame will be queued. If the received frame is a Close frame, an event to send a Close frame will be queued and the WebSocket will close. However, events are not acted upon unless flushed (see the documentation on the WebSocket type for more details).

Receives a Frame over the WebSocket connection without handling incoming frames. For example, receiving a Ping frame will not queue a Pong frame to be sent, and receiving a Close frame will not queue a Close frame to be sent nor close the connection.

To automatically handle incoming frames, use the receive() method instead.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.