Expand description

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

Modules

Structs

  • Websocket client and server implementation
  • Websocket details extracted from the http header
  • Websocket options used by a websocket client to initiate an opening handshake with a websocket server
  • The metadata result of a read function call of a websocket

Enums

Traits

Functions

  • Reads an http header and extracts websocket specific information from it.

Type Definitions

  • Result returning a websocket specific error if encountered
  • Used to return a sized type from WebSocketClient::new_client()
  • A fixed length 24-character string used to hold a websocket key for the opening handshake
  • Used to return a sized type from WebSocket::new_server()
  • A maximum sized 24-character string used to store a sub protocol (e.g. chat)