Skip to main content

Module envelope

Module envelope 

Source
Expand description

Layer 6: Envelope — Namespace-routed message framing.

All application messages exchanged over WebSocket connections are wrapped in an Envelope. The envelope carries a namespace string that routes messages to the correct application subscriber, and an opaque JSON payload that truffle-core never inspects.

§Layer rules

  • Layer 6 defines the envelope format, serialization, and deserialization
  • Layer 6 does NOT route messages — that is the Node/Session layer’s job
  • Layer 6 does NOT know about WebSocket, TCP, or any transport
  • The namespace field is an opaque string — Layer 6 never matches known values
  • No "mesh", "device-announce", or "file-transfer" constants here

Re-exports§

pub use codec::EnvelopeCodec;
pub use codec::JsonCodec;

Modules§

codec
Envelope codecs — pluggable serialization for Envelope.

Structs§

Envelope
A namespace-routed message. All application messages use this format over WebSocket connections. truffle-core NEVER inspects the payload.

Enums§

EnvelopeError
Errors from Layer 6 envelope operations.