Crate ws

Crate ws 

Source
Available on crate feature ws only.
Expand description

WebSocket support based on tungstenite.

This library is an implementation of WebSocket handshakes and streams for compio. It is based on the tungstenite crate which implements all required WebSocket protocol logic. This crate brings compio support / compio integration to it.

Each WebSocket stream implements message reading and writing.

Modules§

tungstenite
Lightweight, flexible WebSockets for Rust.

Structs§

Config
Configuration for compio-ws.
WebSocketStream
A WebSocket stream that works with compio.

Functions§

accept_async
Accepts a new WebSocket connection with the provided stream.
accept_async_with_config
Similar to accept_async() but user can specify a Config.
accept_hdr_async
Accepts a new WebSocket connection with the provided stream.
accept_hdr_with_config_async
Similar to accept_hdr_async() but user can specify a Config.
client_async
Creates a WebSocket handshake from a request and a stream.
client_async_tls
Creates a WebSocket handshake from a request and a stream, upgrading the stream to TLS if required.
client_async_tls_with_config
Similar to client_async_tls() but the one can specify a websocket configuration, and an optional connector.
client_async_with_config
Similar to client_async() but user can specify a Config.
connect_async
Connect to a given URL.
connect_async_tls_with_config
Similar to connect_async(), but user can specify a Config and an optional TlsConnector.
connect_async_with_config
Similar to connect_async(), but user can specify a Config.