pub enum WsMessage {
Binary(Bytes),
Ping(Bytes),
Close,
}Expand description
Decoded WebSocket message returned by WsFrameReader.
The mux reader matches on these variants to dispatch SPDY frames, handle WS-level keepalive (Ping triggers Pong), and detect connection close.
Skip-class frames (Pong, Text, Continuation) are absorbed inside the
adapter’s read loop and never reach the mux. The mux reader’s idle timer
resets on any successful return from read_message(), so absorbed frames
still count as activity.
Variants§
Binary(Bytes)
Binary payload containing one or more SPDY frames.
Ping(Bytes)
WebSocket-level PING from the peer. The mux reader enqueues a
SendWsPong command so the writer responds.
Close
WebSocket close frame. The mux reader breaks its loop.
Auto Trait Implementations§
impl !Freeze for WsMessage
impl RefUnwindSafe for WsMessage
impl Send for WsMessage
impl Sync for WsMessage
impl Unpin for WsMessage
impl UnsafeUnpin for WsMessage
impl UnwindSafe for WsMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more