|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
Accepts incoming WebRTC peer connections under a fixed identity. More...
#include <cpp/a11/net/webrtc_wire_stream.h>
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< SignallingTransport > | signalling_endpoint () const |
Static Public Member Functions | |
| static absl::StatusOr< std::shared_ptr< WebRtcWireServer > > | Create (std::string identity, const std::shared_ptr< SignallingService > &signalling, OnWebRtcStream on_stream, WebRtcConfiguration configuration={}, WireStreamOptions stream_options={}) |
| Creates a WebRTC server that accepts peer connections. | |
| static absl::StatusOr< std::shared_ptr< WebRtcWireServer > > | Create (const std::shared_ptr< SignallingTransport > &signalling, OnWebRtcStream on_stream, WebRtcConfiguration configuration={}, WireStreamOptions stream_options={}) |
| Creates a WebRTC server negotiating over an explicit transport. | |
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.
| a11::net::WebRtcWireServer::~WebRtcWireServer | ( | ) |
|
static |
Creates a WebRTC server negotiating over an explicit transport.
Prefer this overload when the peers are reached across a network through a remote signalling server rather than a service in this process: connect a WebSocketSignallingClient to it and hand the client over here. The server listens as whatever identity the transport registered under, so there is no separate identity to keep in step.
The mirror of WebRtcWireStream::CreateClient's transport overload, and the one that makes an agent behind a signalling rendezvous reachable at all.
| signalling | Connected signalling transport; its identity is the server's. The server takes over its message callback, and closes it when stopped. It is the server's rendezvous, not a caller-owned side channel. |
| on_stream | Callback invoked with each accepted stream. |
| configuration | ICE and fragmentation settings. |
| stream_options | Transport-level WireStreamOptions per stream. |
|
static |
Creates a WebRTC server that accepts peer connections.
Registers identity on an in-process signalling service. The overload below is the general one; this is the convenience for the case where the peers are negotiating through a service in this process.
| identity | Local identity this server listens as. |
| signalling | Signalling service used to negotiate with peers. |
| on_stream | Callback invoked with each accepted stream. |
| configuration | ICE and fragmentation settings. |
| stream_options | Transport-level WireStreamOptions per stream. |
| std::string a11::net::WebRtcWireServer::identity | ( | ) | const |
| size_t a11::net::WebRtcWireServer::pending_peer_count | ( | ) | const |
| bool a11::net::WebRtcWireServer::running | ( | ) | const |
| std::shared_ptr< SignallingTransport > a11::net::WebRtcWireServer::signalling_endpoint | ( | ) | const |
| absl::Status a11::net::WebRtcWireServer::Stop | ( | ) |
Stops the server and stops accepting new peer connections.