Struct websockets::WebSocketWriteHalf[][src]

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

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

Implementations

Flushes incoming events from the read half. If the read half received a Ping frame, a Pong frame will be sent. If the read half received a Close frame, an echoed Close frame will be sent and the WebSocket will close. See the documentation on the WebSocket type for more details about events.

Sends an already constructed Frame over the WebSocket connection.

This method will flush incoming events. See the documentation on the WebSocket type for more details about events.

Sends a Text frame over the WebSocket connection, constructed from passed arguments. continuation will be false and fin will be true. To use a custom continuation or fin, construct a Frame and use WebSocketWriteHalf::send().

This method will flush incoming events. See the documentation on the WebSocket type for more details about events.

Sends a Binary frame over the WebSocket connection, constructed from passed arguments. continuation will be false and fin will be true. To use a custom continuation or fin, construct a Frame and use WebSocketWriteHalf::send().

This method will flush incoming events. See the documentation on the WebSocket type for more details about events.

Shuts down the WebSocket connection without sending a Close frame. It is recommended to use the close() method instead.

Sends a Close frame over the WebSocket connection, constructed from passed arguments, and closes the WebSocket connection.

As per the WebSocket protocol, the server should send a Close frame in response upon receiving a Close frame. Although the write half will be closed, the server’s echoed Close frame can be read from the still open read half.

This method will flush incoming events. See the documentation on the WebSocket type for more details about events.

Sends a Ping frame over the WebSocket connection, constructed from passed arguments.

This method will flush incoming events. See the documentation on the WebSocket type for more details about events.

Sends a Pong frame over the WebSocket connection, constructed from passed arguments.

This method will flush incoming events. See the documentation on the WebSocket type for more details about events.

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.