Fronts an in-process SignallingService over a WebSocket.
More...
#include <cpp/a11/net/websocket_signalling.h>
Fronts an in-process SignallingService over a WebSocket.
Lets remote peers join the same signalling fabric: each connecting WebSocketSignallingClient is registered with the wrapped SignallingService under its identity, so messages route between local and remote peers alike.
◆ ~WebSocketSignallingServer()
| a11::net::WebSocketSignallingServer::~WebSocketSignallingServer |
( |
| ) |
|
◆ Create()
Creates a WebSocket signalling server fronting service.
- Parameters
-
| service | The in-process signalling service to expose. |
| options | Listen address, port, path prefix, and limits. |
- Returns
- The running server, or an error status.
◆ Disconnect()
| absl::Status a11::net::WebSocketSignallingServer::Disconnect |
( |
std::string_view |
identity | ) |
|
Closes one identity's connection, if this server holds it.
The counterpart to admission: whatever authorised a registration can be withdrawn – a credential expires, a lease is taken by somebody else – and the socket has to go with it rather than surviving until its next message. on_departed fires as it would for a voluntary disconnect, so bookkeeping has one path rather than two.
- Parameters
-
| identity | The registered identity to disconnect. |
- Returns
- OK, or
NOT_FOUND when this server is not holding it.
◆ GetImpl()
| void *absl_nullable a11::net::WebSocketSignallingServer::GetImpl |
( |
| ) |
const |
- Returns
- An opaque native handle for advanced interop, or nullptr.
◆ port()
| std::uint16_t a11::net::WebSocketSignallingServer::port |
( |
| ) |
const |
- Returns
- The port listened on, resolved even for an ephemeral 0.
◆ running()
| bool a11::net::WebSocketSignallingServer::running |
( |
| ) |
const |
- Returns
- Whether the server is currently running.
◆ service()
| std::shared_ptr< SignallingService > a11::net::WebSocketSignallingServer::service |
( |
| ) |
const |
- Returns
- The signalling service this server fronts.
◆ Stop()
| absl::Status a11::net::WebSocketSignallingServer::Stop |
( |
| ) |
|
Stops the server and closes all client connections.
The documentation for this class was generated from the following files: