|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
The WebSocket Protocol (RFC 6455), client end: the opening handshake and the base framing protocol (PROTOCORE_ENABLE_WS_CLIENT). More...
#include "protocore_config.h"Go to the source code of this file.
The WebSocket Protocol (RFC 6455), client end: the opening handshake and the base framing protocol (PROTOCORE_ENABLE_WS_CLIENT).
RFC 6455 sec 3 gives the connection its four terms: /host/, /port/, /secure/ and the /resource name/ the request-line targets. The opening handshake rides on HTTP/1.1 - a GET request-line (RFC 9112 sec 3) carrying Host (RFC 9110 sec 7.2) and Upgrade (RFC 9110 sec 7.8), answered by 101 Switching Protocols (RFC 9110 sec 15.2.2). After that the connection carries frames, not messages, and every frame this end sends is masked (RFC 6455 sec 5.3).
Two halves behind one handle:
Only a message that fits PROTOCORE_WS_CLIENT_BUF_SIZE is delivered.
The module exports one symbol, WsClient. Everything in ws_client.c has internal linkage.
Definition in file ws_client.h.