Accepts inbound WebSocket connections and hands each to a callback.
More...
#include <cpp/a11/net/websocket_wire_stream.h>
Accepts inbound WebSocket connections and hands each to a callback.
The server-side entry point for hosting an agent over WebSockets: every accepted connection invokes on_stream concurrently with a fresh WebSocketWireStream, which the handler typically drives via Accept().
◆ ~WebSocketWireServer()
| a11::net::WebSocketWireServer::~WebSocketWireServer |
( |
| ) |
|
◆ Create()
Starts a WebSocket server accepting A11 connections.
- Parameters
-
| on_stream | Callback run for each accepted stream. |
| options | Listen address, port, path, and TLS/framing settings. |
- Returns
- The running server, or an error status.
◆ GetImpl()
| void *absl_nullable a11::net::WebSocketWireServer::GetImpl |
( |
| ) |
const |
- Returns
- An opaque native handle for advanced interop, or nullptr.
◆ port()
| absl::StatusOr< std::uint16_t > a11::net::WebSocketWireServer::port |
( |
| ) |
const |
- Returns
- The actual port listened on, resolved even for an ephemeral 0.
◆ running()
| bool a11::net::WebSocketWireServer::running |
( |
| ) |
const |
- Returns
- Whether the server is currently accepting connections.
◆ Stop()
| absl::Status a11::net::WebSocketWireServer::Stop |
( |
| ) |
|
Stops the server and closes the listening socket.
The documentation for this class was generated from the following files: