|
cxxmcp 1.1.6
C++ MCP SDK
|
Configuration for the WebSocket client transport. More...
#include <websocket_transport.hpp>
Public Attributes | |
| std::string | uri |
| Full ws:// or wss:// URI for the MCP endpoint. | |
| std::string | host = "127.0.0.1" |
| Remote host (used when uri is empty). | |
| int | port = 80 |
| Remote port (used when uri is empty). | |
| std::string | path = "/mcp" |
| WebSocket path (used when uri is empty). | |
| std::unordered_map< std::string, std::string > | headers |
| Extra HTTP headers sent during the WebSocket upgrade handshake. | |
| std::optional< std::string > | auth_header |
| Optional Authorization header value (e.g. "Bearer <token>"). | |
| std::chrono::milliseconds | timeout {30000} |
| Per-operation timeout for the WebSocket connection. | |
| bool | auto_reconnect = true |
| Enable automatic reconnection on disconnect. | |
| int | max_reconnect_attempts = 0 |
| Maximum consecutive reconnection attempts. 0 = unlimited. | |
| std::chrono::milliseconds | reconnect_initial_delay {1000} |
| Initial backoff delay before the first reconnect attempt. | |
| std::chrono::milliseconds | reconnect_max_delay {30000} |
| Maximum backoff delay (cap for exponential growth). | |
| double | reconnect_backoff_multiplier = 2.0 |
| Backoff multiplier applied after each failed attempt. | |
| time_t | ping_interval_sec = 30 |
| WebSocket ping interval in seconds (0 = disabled). | |
| int | max_missed_pongs = 3 |
| Maximum missed pongs before considering the connection dead. | |
Configuration for the WebSocket client transport.
| std::string mcp::transport::WebSocketClientTransportOptions::uri |
Full ws:// or wss:// URI for the MCP endpoint.
If set, host/port/path are derived from this value.