NetBurner 3.5.6
PDF Version |
WebSocket Protocol Implementation for Real-Time Bidirectional Communication #include< websockets.h>
More...
Macros | |
#define | WS_BUFFER_SEGMENTS 4 |
Number of buffer segments per WebSocket connection (RX, TX, Control buffers) | |
#define | WS_MAX_SOCKS 4 |
Maximum number of simultaneous WebSocket connections supported. | |
#define | WS_BUFFER_MIN 10 |
Minimum buffer space threshold (bytes) before triggering flush/block. | |
#define | WS_ACCUM_DLY ((TICKS_PER_SECOND / 4) + 1) |
Accumulation delay (ticks) for batching small writes (~250ms) | |
#define | WS_FLUSH_TIMEOUT 0 |
Flush operation timeout in ticks (0 = non-blocking) | |
#define | WS_FIN_BIT 0x80 |
Frame FIN bit (0x80) indicating final fragment of message. | |
#define | WS_OP_CONT 0x0 |
WebSocket continuation frame opcode for message fragments. | |
#define | WS_OP_TEXT 0x1 |
WebSocket text frame opcode for UTF-8 encoded text data. | |
#define | WS_OP_BIN 0x2 |
WebSocket binary frame opcode for raw binary data. | |
#define | WS_OP_CLOSE 0x8 |
WebSocket close frame opcode for graceful connection termination. | |
#define | WS_OP_PING 0x9 |
WebSocket ping frame opcode for connection liveness check. | |
#define | WS_OP_PONG 0xA |
WebSocket pong frame opcode for ping response. | |
#define | WS_SO_TEXT 0x8 |
Socket option flag to enable text frame mode (vs binary mode) | |
WebSocket Protocol Implementation for Real-Time Bidirectional Communication #include< websockets.h>
The NetBurner WebSocket implementation provides full-duplex communication channels over a single TCP connection, enabling real-time data exchange between clients and servers. WebSockets upgrade from HTTP connections and maintain persistent connections for efficient, low-latency bidirectional messaging.
Key features include:
Defines for configuration, status and error codes.