Crate embedded_websocket[−][src]
Embedded Websocket
embedded_websocket
facilitates the encoding and decoding of websocket frames and can be used
for both clients and servers. The library is intended to be used in constrained memory
environments like embedded microcontrollers which cannot reference the rust standard library.
It will work with arbitrarily small buffers regardless of websocket frame size as long as the
websocket header can be read (2 - 14 bytes depending on the payload size and masking).
Since the library is essentially an encoder or decoder of byte slices, the developer is free to
use whatever transport mechanism they chose. The examples in the source repository use the
TcpStream from the standard library.
Re-exports
pub use self::random::EmptyRng; |
Modules
framer | |
random |
Structs
WebSocket | Websocket client and server implementation |
WebSocketContext | Websocket details extracted from the http header |
WebSocketOptions | Websocket options used by a websocket client to initiate an opening handshake with a websocket server |
WebSocketReadResult | The metadata result of a |
Enums
Client | |
Error | Websocket specific errors |
Server | |
WebSocketCloseStatusCode | Websocket close status code as per the rfc6455 websocket spec |
WebSocketReceiveMessageType | Websocket receive message type use when reading a websocket frame |
WebSocketSendMessageType | Websocket send message type used when sending a websocket frame |
WebSocketState | The state of the websocket |
Traits
WebSocketType |
Functions
read_http_header | Reads an http header and extracts websocket specific information from it. |
Type Definitions
Result | Result returning a websocket specific error if encountered |
WebSocketClient | Used to return a sized type from |
WebSocketKey | A fixed length 24-character string used to hold a websocket key for the opening handshake |
WebSocketServer | Used to return a sized type from |
WebSocketSubProtocol | A maximum sized 24-character string used to store a sub protocol (e.g. |