handy_httpd.components.websocket.frame

Contains the low-level implementation of the WebSocket data frame spec, as well as some friendly functions for reading and writing data frames from D types.

Members

Enums

WebSocketCloseStatusCode
enum WebSocketCloseStatusCode

An enumeration of possible closing status codes for websocket connections, as per https://datatracker.ietf.org/doc/html/rfc6455#section-7.4

WebSocketFrameOpcode
enum WebSocketFrameOpcode

An enumeration of valid opcodes for websocket data frames. https://datatracker.ietf.org/doc/html/rfc6455#section-5.2

Functions

receiveWebSocketFrame
WebSocketFrame receiveWebSocketFrame(S stream)

Receives a websocket frame from a byte input stream.

sendWebSocketFrame
void sendWebSocketFrame(S stream, WebSocketFrame frame)

Sends a websocket frame to a byte output stream.

Structs

WebSocketFrame
struct WebSocketFrame

Internal intermediary structure used to hold the results of parsing a websocket frame.