ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
ws.h File Reference

Layer 5 (Session) - opening and closing a WebSocket connection. More...

#include "protocore_config.h"

Go to the source code of this file.

Detailed Description

Layer 5 (Session) - opening and closing a WebSocket connection.

RFC 4254 sec 5 states the shape: "Multiple channels are multiplexed into a single connection", either side "allocates a local number for the channel" to open one, and a party "may then reuse the channel number" once it is closed. Sequencing that open and that close is this layer's.

RFC 9293 sec 3.6 MUST-12 is why the close is one call rather than each caller's checklist: "If the local TCP connection is closed by the remote side due to a FIN or RST received from the remote side, then the local application MUST be informed whether it closed normally or was aborted." A close that releases the number without informing the application leaves that application holding state for a connection that no longer exists.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file ws.h.