A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::net::SignallingMessage Struct Reference

One signalling payload: an SDP description, an ICE candidate, or an error. More...

#include <cpp/a11/net/signalling.h>

Public Member Functions

absl::Status Validate () const
 
absl::StatusOr< std::string > ToJson () const
 

Static Public Member Functions

static absl::StatusOr< SignallingMessage > FromJson (std::string_view json)
 Parses a message from its JSON wire representation.
 

Public Attributes

SignallingMessageType type
 Payload discriminator.
 
std::string sender = {}
 Identity of the originating peer.
 
std::string recipient
 Identity of the target peer.
 
std::string description = {}
 SDP offer or answer text.
 
std::string description_type = {}
 SDP type, such as offer or answer.
 
std::string candidate = {}
 ICE candidate text.
 
std::string mid = {}
 Media/data-section id for the candidate.
 
absl::Status error = {}
 Negotiation failure for kError messages.
 
std::vector< std::string > capabilities = {}
 Capability tokens the sender supports; a peer echoes those it shares.
 

Detailed Description

One signalling payload: an SDP description, an ICE candidate, or an error.

Addressed from sender to recipient. Which fields are meaningful depends on type; ToJson()/FromJson() move it over a network transport.

Member Function Documentation

◆ FromJson()

absl::StatusOr< SignallingMessage > a11::net::SignallingMessage::FromJson ( std::string_view  json)
static

Parses a message from its JSON wire representation.

Returns
The parsed message, or an error status.

◆ ToJson()

absl::StatusOr< std::string > a11::net::SignallingMessage::ToJson ( ) const
Returns
The JSON wire representation, or an error status.

◆ Validate()

absl::Status a11::net::SignallingMessage::Validate ( ) const
Returns
OK if the fields are consistent for this message's type.

Member Data Documentation

◆ candidate

std::string a11::net::SignallingMessage::candidate = {}

ICE candidate text.

◆ capabilities

std::vector<std::string> a11::net::SignallingMessage::capabilities = {}

Capability tokens the sender supports; a peer echoes those it shares.

Additive, and ignored by a peer that does not know a token – which is what makes it safe to introduce one. An older peer never echoes, so the feature stays off rather than breaking the connection, and no version negotiation is needed. Currently only a11-pmtud/1 (path MTU probing).

◆ description

std::string a11::net::SignallingMessage::description = {}

SDP offer or answer text.

◆ description_type

std::string a11::net::SignallingMessage::description_type = {}

SDP type, such as offer or answer.

◆ error

absl::Status a11::net::SignallingMessage::error = {}

Negotiation failure for kError messages.

◆ mid

std::string a11::net::SignallingMessage::mid = {}

Media/data-section id for the candidate.

◆ recipient

std::string a11::net::SignallingMessage::recipient

Identity of the target peer.

◆ sender

std::string a11::net::SignallingMessage::sender = {}

Identity of the originating peer.

◆ type

SignallingMessageType a11::net::SignallingMessage::type
Initial value:

Payload discriminator.


The documentation for this struct was generated from the following files: