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

Accepts incoming WebRTC peer connections under a fixed identity. More...

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

Inheritance diagram for a11::net::WebRtcWireServer:
[legend]

Classes

struct  State
 

Public Member Functions

 ~WebRtcWireServer ()
 
absl::Status Stop ()
 Stops the server and stops accepting new peer connections.
 
std::string identity () const
 
bool running () const
 
size_t pending_peer_count () const
 
std::shared_ptr< SignallingEndpointsignalling_endpoint () const
 

Static Public Member Functions

static absl::StatusOr< std::shared_ptr< WebRtcWireServer > > Create (std::string identity, std::shared_ptr< SignallingService > signalling, OnWebRtcStream on_stream, WebRtcConfiguration configuration={}, WireStreamOptions stream_options={})
 Creates a WebRTC server that accepts peer connections.
 

Detailed Description

Accepts incoming WebRTC peer connections under a fixed identity.

Listens on a signalling service for offers addressed to identity, completes the ICE/SDP handshake for each peer, and hands the resulting WebRtcWireStream to a callback.

Constructor & Destructor Documentation

◆ ~WebRtcWireServer()

a11::net::WebRtcWireServer::~WebRtcWireServer ( )

Member Function Documentation

◆ Create()

absl::StatusOr< std::shared_ptr< WebRtcWireServer > > a11::net::WebRtcWireServer::Create ( std::string  identity,
std::shared_ptr< SignallingService signalling,
OnWebRtcStream  on_stream,
WebRtcConfiguration  configuration = {},
WireStreamOptions  stream_options = {} 
)
static

Creates a WebRTC server that accepts peer connections.

Parameters
identityLocal identity this server listens as.
signallingSignalling service used to negotiate with peers.
on_streamCallback invoked with each accepted stream.
configurationICE and fragmentation settings.
stream_optionsTransport-level WireStreamOptions per stream.
Returns
The running server, or an error status.

◆ identity()

std::string a11::net::WebRtcWireServer::identity ( ) const
Returns
The local identity this server listens as.

◆ pending_peer_count()

size_t a11::net::WebRtcWireServer::pending_peer_count ( ) const
Returns
The number of peers still completing negotiation.

◆ running()

bool a11::net::WebRtcWireServer::running ( ) const
Returns
Whether the server is currently running.

◆ signalling_endpoint()

std::shared_ptr< SignallingEndpoint > a11::net::WebRtcWireServer::signalling_endpoint ( ) const
Returns
The signalling endpoint the server negotiates over.

◆ Stop()

absl::Status a11::net::WebRtcWireServer::Stop ( )

Stops the server and stops accepting new peer connections.


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