Crate compio_ws

Crate compio_ws 

Source
Expand description

Async WebSocket support for compio.

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§

stream

Structs§

WebSocketConfig
The configuration for WebSocket connection.
WebSocketStream

Enums§

TungsteniteError
Possible WebSocket errors.
WebSocketMessage
An enum representing the various forms of a WebSocket message.

Functions§

accept_async
Accepts a new WebSocket connection with the provided stream.
accept_async_with_config
The same as accept_async() but the one can specify a websocket configuration. Please refer to accept_async() for more details.
accept_hdr_async
Accepts a new WebSocket connection with the provided stream.
accept_hdr_with_config_async
The same as accept_hdr_async() but the one can specify a websocket configuration. Please refer to accept_hdr_async() for more details.
client_async
Creates a WebSocket handshake from a request and a stream.
client_async_with_config
The same as client_async() but the one can specify a websocket configuration. Please refer to client_async() for more details.

Type Aliases§

Response
Client response type.