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

WAMP (Web Application Messaging Protocol) codec (PROTOCORE_ENABLE_WAMP) - zero-heap message builders plus a positional element reader, riding the shipped WebSocket layer. More...

#include "protocore_config.h"

Go to the source code of this file.

Detailed Description

WAMP (Web Application Messaging Protocol) codec (PROTOCORE_ENABLE_WAMP) - zero-heap message builders plus a positional element reader, riding the shipped WebSocket layer.

WAMP is specified by the WAMP project at wamp-proto.org, not by the IETF. The document is distributed in Internet-Draft format as "WAMP Basic Profile" and carries no RFC number; every section cited in this module is that document's.

WAMP sec 3.3: a message is a list whose first element is the message type code, and the application payload is always the tail of that list. SUBSCRIBE is [SUBSCRIBE, Request|id, Options|dict, Topic|uri] (sec 3.4.2.3). The builders drive the shared Json writer to emit these lists into the caller's buffer: Options|dict and Details|dict default to {}, and Arguments|list / ArgumentsKw|dict are pre-formatted JSON literals or are left off (sec 3.7). The reader is a positional scanner over one received list - the message type code, an id at a position, or a URI - which is what WELCOME, SUBSCRIBED, EVENT, RESULT, INVOCATION and ERROR handling reads.

WAMP sec 2.3.1 names the WebSocket subprotocol this JSON serialization rides, wamp.2.json, where every frame is a text frame. The connection and the session / subscription / registration tables are the application's; this is the message codec.

The module exports one symbol, Wamp. Everything in wamp.c has internal linkage.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file wamp.h.