|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Functions | |
| auto | create_connection (std::string_view id="") -> std::unique_ptr< unified::i_connection > |
| Creates a WebSocket connection (not yet started) | |
| auto | connect (std::string_view url, std::string_view id="") -> std::unique_ptr< unified::i_connection > |
| Creates and starts a WebSocket connection in one call. | |
| auto | connect (const unified::endpoint_info &endpoint, std::string_view path="/", std::string_view id="") -> std::unique_ptr< unified::i_connection > |
| Creates and starts a WebSocket connection using endpoint info. | |
| auto | create_listener (std::string_view id="") -> std::unique_ptr< unified::i_listener > |
| Creates a WebSocket listener (not yet listening) | |
| auto | listen (const unified::endpoint_info &bind_address, std::string_view path="/", std::string_view id="") -> std::unique_ptr< unified::i_listener > |
| Creates and starts a WebSocket listener in one call. | |
| auto | listen (uint16_t port, std::string_view path="/", std::string_view id="") -> std::unique_ptr< unified::i_listener > |
| Creates and starts a WebSocket listener on a specific port. | |
|
nodiscard |
Creates and starts a WebSocket connection using endpoint info.
| endpoint | The endpoint with host and port |
| path | The WebSocket path (default: "/") |
| id | Optional unique identifier for the connection |
This overload is useful when host and port are known separately. The connection will use plain WebSocket (ws://).
Definition at line 47 of file websocket.cpp.
|
nodiscard |
Creates and starts a WebSocket connection in one call.
| url | The WebSocket URL to connect to (ws:// or wss://) |
| id | Optional unique identifier for the connection |
This is a convenience function that creates a WebSocket connection and immediately initiates the connection with the specified URL.
ws://host:port/path - Plain WebSocketwss://host:port/path - Secure WebSocket (TLS)Definition at line 39 of file websocket.cpp.
References create_connection().

|
nodiscard |
Creates a WebSocket connection (not yet started)
| id | Optional unique identifier for the connection |
The returned connection is not started. Call connect() with a URL to establish the WebSocket connection.
WebSocket is a full-duplex protocol over TCP. The connection starts with an HTTP upgrade handshake.
Definition at line 33 of file websocket.cpp.
Referenced by connect().

|
nodiscard |
Creates a WebSocket listener (not yet listening)
| id | Optional unique identifier for the listener |
The returned listener is not listening. Call start() to begin accepting WebSocket connections.
WebSocket servers accept HTTP upgrade requests and establish full-duplex connections with clients.
Definition at line 59 of file websocket.cpp.
|
nodiscard |
Creates and starts a WebSocket listener in one call.
| bind_address | The local address to bind to |
| path | The WebSocket path to handle (default: "/") |
| id | Optional unique identifier for the listener |
This is a convenience function that creates a listener and immediately starts listening on the specified address.
Definition at line 65 of file websocket.cpp.
Referenced by listen().

|
nodiscard |
Creates and starts a WebSocket listener on a specific port.
| port | The port number to listen on |
| path | The WebSocket path to handle (default: "/") |
| id | Optional unique identifier for the listener |
Convenience overload that binds to all interfaces (0.0.0.0).
Definition at line 77 of file websocket.cpp.
References listen().
