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

Listen address, limits and policy hooks for a WebSocketSignallingServer. More...

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

Public Member Functions

absl::Status Validate () const
 

Public Attributes

std::string path_prefix
 Prefix before identity registration paths.
 
std::string bind_address = "127.0.0.1"
 Local listen address.
 
std::uint16_t port = 0
 Listen port; zero requests an ephemeral port.
 
Http2Options http2_options
 Server HTTP/2 and TLS policy.
 
size_t max_message_size = 1024 * 1024
 Inbound JSON message limit.
 
OnSignallingAdmission on_admit
 Admission control, if any.
 
OnSignallingDeparture on_departed
 Presence bookkeeping, if any.
 
OnSignallingMessageFilter on_message
 Per-message policy, if any.
 
OnSignallingUnroutable on_unroutable
 Where else to look, if anywhere.
 
bool replace_existing = false
 Whether a new registration displaces an existing one.
 

Detailed Description

Listen address, limits and policy hooks for a WebSocketSignallingServer.

A port of 0 requests an ephemeral port; http2_options carries transport and TLS settings, and max_message_size bounds inbound signalling frames. The four handlers are all optional, and a server with none of them set behaves exactly as one that never had them.

Member Function Documentation

◆ Validate()

absl::Status a11::net::WebSocketSignallingServerOptions::Validate ( ) const
Returns
OK if the options are internally consistent.

Member Data Documentation

◆ bind_address

std::string a11::net::WebSocketSignallingServerOptions::bind_address = "127.0.0.1"

Local listen address.

◆ http2_options

Http2Options a11::net::WebSocketSignallingServerOptions::http2_options

Server HTTP/2 and TLS policy.

◆ max_message_size

size_t a11::net::WebSocketSignallingServerOptions::max_message_size = 1024 * 1024

Inbound JSON message limit.

◆ on_admit

OnSignallingAdmission a11::net::WebSocketSignallingServerOptions::on_admit

Admission control, if any.

◆ on_departed

OnSignallingDeparture a11::net::WebSocketSignallingServerOptions::on_departed

Presence bookkeeping, if any.

◆ on_message

OnSignallingMessageFilter a11::net::WebSocketSignallingServerOptions::on_message

Per-message policy, if any.

◆ on_unroutable

OnSignallingUnroutable a11::net::WebSocketSignallingServerOptions::on_unroutable

Where else to look, if anywhere.

◆ path_prefix

std::string a11::net::WebSocketSignallingServerOptions::path_prefix
Initial value:
=
"/"

Prefix before identity registration paths.

◆ port

std::uint16_t a11::net::WebSocketSignallingServerOptions::port = 0

Listen port; zero requests an ephemeral port.

◆ replace_existing

bool a11::net::WebSocketSignallingServerOptions::replace_existing = false

Whether a new registration displaces an existing one.

Off by default, which makes a second registration of a live identity ALREADY_EXISTS – the safe answer when nothing above this layer knows which of the two is legitimate. A deployment whose on_admit does know (because it just issued the newcomer an exclusive claim) sets this, and the displaced connection is closed before the newcomer is registered. Without it, a host that restarted cannot take its own identity back until the socket its dead predecessor left behind is noticed.


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