Expand description
Contains useful WebSocket type aliases and a default WebSocket implementation of a
StreamParser.
Structs§
- WebSocket
Parser - Default
StreamParserimplementation for aWebSocket.
Functions§
- connect
- Connect asynchronously to a
WebSocketserver. - is_
websocket_ disconnected - Determine whether a
WsErrorindicates theWebSockethas disconnected. - process_
binary - Process a payload of
Vec<u8>bytes by deserialising into anExchangeMessage. - process_
close_ frame - Basic process for a
WebSocketCloseFrame message. Logs the payload attracelevel. - process_
frame - Basic process for a
WebSocketFrame message. Logs the payload attracelevel. - process_
ping - Basic process for a
WebSocketping message. Logs the payload attracelevel. - process_
pong - Basic process for a
WebSocketpong message. Logs the payload attracelevel. - process_
text - Process a payload of
Stringby deserialising into anExchangeMessage.
Type Aliases§
- WebSocket
- Convenient type alias for a tungstenite
WebSocketStream. - WsError
- Communicative type alias for a tungstenite
WebSocketError. - WsMessage
- Communicative type alias for a tungstenite
WebSocketMessage. - WsSink
- Convenient type alias for the
Sinkhalf of a tungsteniteWebSocket. - WsStream
- Convenient type alias for the
Streamhalf of a tungsteniteWebSocket.