Crate blitz_ws

Crate blitz_ws 

Source
Expand description

Blitz: Lightweight WebSocket + HTTP server components

Re-exports§

pub use crate::client::client;
pub use crate::client::connect;
pub use crate::client::ClientRequestBuilder;
pub use crate::handshake::client::ClientHandshake;
pub use crate::handshake::server::ServerHandshake;
pub use crate::handshake::HandshakeError;
pub use http;

Modules§

buffer
A buffer for reading data from the network.
client
Utilities to connect to a WebSocket as a client
error
Error handling
handshake
Handshake module
protocol
Protocol module
stream
Convenience wrapper for streams to switch between plain TCP and TLS at runtime.
util
Helper traits to ease non-blocking handling.

Structs§

Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.

Enums§

Connector
A connector that can be used when establishing connections, allowing to control whether native-tls or rustls is used to create a TLS connection. Or TLS can be disabled with the Plain variant.

Constants§

MAX_ALLOWED_LEN
Constant for maximum message payload length
MAX_CONTINUATION_FRAMES
Constant for maximum continuation frames
MAX_CONTROL_FRAME_PAYLOAD
Constant for maximum control frame payload size

Functions§

accept
Accept the given Stream as a WebSocket.
accept_header
Accept the given Stream as a WebSocket.
accept_header_with_config
Accept the given Stream as a WebSocket.
accept_with_config
Accept the given Stream as a WebSocket.
client_tls
Creates a WebSocket handshake from a request and a stream, upgrading the stream to TLS if required.
client_tls_with_config
The same as client_tls() but one can specify a websocket configuration, and an optional connector. If no connector is specified, a default one will be created.