Skip to main content

Module web_socket

Module web_socket 

Source
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§

compression
https://datatracker.ietf.org/doc/html/rfc7692

Structs§

Frame
Unit of generic data used for communication.
WebSocket
Full-duplex communication over an asynchronous stream.
WebSocketAcceptorweb-socket-handshake
WebSocket acceptor
WebSocketBuffer
Buffer used for internal operations.
WebSocketCommonMut
Auxiliary common structure used by WebSocketReaderMut and WebSocketWriterMut
WebSocketConnectorweb-socket-handshake
WebSocket connector
WebSocketPartsOwned
Owned reader and writer pair
WebSocketReaderMut
Auxiliary structure that can be used when it is necessary to write a received frame that belongs to the same instance.
WebSocketReaderOwned
Reader that can be used in concurrent scenarios.
WebSocketReplier
The RFC-6455 requires all parties (Client or Server) to send back carefully managed Close frames read from the stream. Received Ping frames must also reply with Pong frames.
WebSocketWriterMut
Auxiliary structure that can be used when it is necessary to write a received frame that belongs to the same instance.
WebSocketWriterOwned
Writer that can be used in concurrent scenarios.

Enums§

CloseCode
Status code used to indicate why an endpoint is closing the WebSocket connection.
OpCode
Defines how to interpret the payload data.
WebSocketError
WebSocket Error
WebSocketPayloadOrigin
The payload of a received frame can represent two things:

Functions§

fill_buffer_with_close_code
The first two bytes of buffer are filled with code. Does nothing if buffer is less than 2 bytes.
fill_buffer_with_close_frame
Copies frame_code and frame_payload into buffer.

Type Aliases§

FrameControlArray
Composed by an array with the maximum allowed size of a frame control.
FrameMut
Composed by a sequence of mutable bytes.
FrameRef
Composed by a sequence of immutable bytes.
FrameVector
Composed by an owned vector.
FrameVectorMut
Composed by a mutable vector reference.
FrameVectorRef
Composed by a immutable vector reference.
WebSocketMut
WebSocket with a mutable reference of WebSocketBuffer.
WebSocketOwned
WebSocket with an owned WebSocketBuffer.