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.