Expand description
A fast, low-overhead WebSocket client.
This crate is optimised for receiving a high volume of messages over a long period. A key feature is that it makes no memory allocations once the connection is set up and the initial messages have been sent and received; it reuses a single pair of buffers, which are sized for the longest message seen so far.
You can use this crate in both asynchronous (futures-based) and synchronous code.
native_tls
provides the TLS functionality for wss://...
servers.
This crate is fully conformant with the fuzzingserver module in the Autobahn test suite.
Structs§
- Client
Builder - Establishes a WebSocket connection.
- Message
- A text string, a block of binary data or a WebSocket control frame.
- Message
Codec - Tokio codec for WebSocket messages. This codec can send and receive
Message
structs.
Enums§
- Opcode
- Represents an opcode as defined by the WebSocket protocol.
Traits§
- Async
Network Stream - Used by
AsyncClient
to represent types that areAsyncRead
andAsyncWrite
. - Network
Stream - Used by
Client
to represent types that areRead
andWrite
.
Type Aliases§
- Async
Client - Exposes a
Sink
and aStream
for sending and receiving WebSocket messages asynchronously. - Client
- Sends and receives WebSocket messages synchronously.
- Error
- Represents errors that can be exposed by this crate.
- Result
- Represents results returned by the non-async functions in this crate.