Expand description

async WebSocket server functionality (requires tokio executor)

Re-exports

Modules

Structs

  • The configuration for WebSocket connection.
  • Atomic counters that allow tracking connection counts and cumulative message sizes in bytes (bandwidth consumption without accounting for the websocket framing overhead). These counters can be created and supplied externally or supplied as None.
  • WebSocketServer that provides the main websocket connection and message processing loop that delivers messages to the installed WebSocketHandler trait.

Enums

  • An enum representing the various forms of a WebSocket message.

Traits

  • WebSocketHandler trait that represents the WebSocket processor functionality. This trait is supplied to the WebSocket which subsequently invokes it’s functions during websocket connection and messages. The trait can override with_handshake() method to enable invocation of the handshake() method upon receipt of the first valid websocket message from the incoming connection.
  • Base WebSocketServer trait allows the WebSocketServer<T> struct to be retained by the trait reference by casting it to the trait as follows:

Type Aliases