Available on crate feature
web-socket only.Expand description
A computer communications protocol, providing full-duplex communication channels over a single TCP connection.
Re-exports§
pub use compression::Compression;pub use compression::CompressionLevel;pub use compression::DeflateConfig;
Modules§
Structs§
- Frame
- Unit of generic data used for communication.
- WebSocket
- Full-duplex communication over an asynchronous stream.
- WebSocket
Acceptor web-socket-handshake - WebSocket acceptor
- WebSocket
Buffer - Buffer used for internal operations.
- WebSocket
Common Mut - Auxiliary common structure used by
WebSocketReaderMutandWebSocketWriterMut - WebSocket
Connector web-socket-handshake - WebSocket connector
- WebSocket
Parts Owned - Owned reader and writer pair
- WebSocket
Reader Mut - Auxiliary structure that can be used when it is necessary to write a received frame that belongs to the same instance.
- WebSocket
Reader Owned - Reader that can be used in concurrent scenarios.
- WebSocket
Replier - The RFC-6455 requires all parties (Client or Server) to send back carefully managed
Closeframes read from the stream. ReceivedPingframes must also reply withPongframes. - WebSocket
Writer Mut - Auxiliary structure that can be used when it is necessary to write a received frame that belongs to the same instance.
- WebSocket
Writer Owned - Writer that can be used in concurrent scenarios.
Enums§
- Close
Code - Status code used to indicate why an endpoint is closing the WebSocket connection.
- OpCode
- Defines how to interpret the payload data.
- WebSocket
Error - WebSocket Error
- WebSocket
Payload Origin - The payload of a received frame can represent two things:
Functions§
- fill_
buffer_ with_ close_ code - The first two bytes of
bufferare filled withcode. Does nothing ifbufferis less than 2 bytes. - fill_
buffer_ with_ close_ frame - Copies
frame_codeandframe_payloadintobuffer.
Type Aliases§
- Frame
Control Array - Composed by an array with the maximum allowed size of a frame control.
- Frame
Mut - Composed by a sequence of mutable bytes.
- Frame
Ref - Composed by a sequence of immutable bytes.
- Frame
Vector - Composed by an owned vector.
- Frame
Vector Mut - Composed by a mutable vector reference.
- Frame
Vector Ref - Composed by a immutable vector reference.
- WebSocket
Mut WebSocketwith a mutable reference ofWebSocketBuffer.- WebSocket
Owned WebSocketwith an ownedWebSocketBuffer.