A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
websocket_signalling.h File Reference

WebSocket-transported signalling for remote WebRTC peers. More...

#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <absl/base/nullability.h>
#include <absl/status/status.h>
#include <absl/status/statusor.h>
#include <absl/time/time.h>
#include "a11/concurrency/future.h"
#include "a11/net/http2.h"
#include "a11/net/signalling.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  a11::net::WebSocketSignallingClientOptions
 Connection tuning for a WebSocketSignallingClient. More...
 
class  a11::net::WebSocketSignallingClient
 A SignallingTransport that relays messages over a WebSocket. More...
 
struct  a11::net::SignallingAdmission
 What a peer presented when asking to register an identity. More...
 
struct  a11::net::WebSocketSignallingServerOptions
 Listen address, limits and policy hooks for a WebSocketSignallingServer. More...
 
class  a11::net::WebSocketSignallingServer
 Fronts an in-process SignallingService over a WebSocket. More...
 

Namespaces

namespace  a11
 
namespace  a11::net
 

Typedefs

using a11::net::OnSignallingAdmission = std::function< a11::Task(SignallingAdmission)>
 Decides whether a peer may register, asynchronously.
 
using a11::net::OnSignallingDeparture = std::function< void(std::string identity)>
 Notified when a registered identity's connection goes away.
 
using a11::net::OnSignallingMessageFilter = std::function< absl::Status(SignallingMessage *absl_nonnull message)>
 Inspects, rewrites or refuses each inbound message before routing.
 
using a11::net::OnSignallingUnroutable = std::function< absl::Status(const SignallingMessage &message)>
 Offered a message whose recipient is not connected to this server.
 

Detailed Description

WebSocket-transported signalling for remote WebRTC peers.

When two WebRTC peers are on different machines they cannot share an in-process SignallingService directly. WebSocketSignallingServer fronts a SignallingService over a WebSocket, and WebSocketSignallingClient is the SignallingTransport a remote peer connects with, registering under an identity and relaying SignallingMessage traffic across the network. These carry the SDP/ICE control handshake, not A11 WireMessage traffic.