SwitchboardWebSocketServer is a WebSocket server that handles incoming WebSocket connections. It processes JSON-RPC commands and manages WebSocket sessions. This server is designed to work with the Switchboard SDK and provides a way to interact with Switchboard objects over WebSockets.
More...
#include <SwitchboardWebSocketServer.hpp>
|
| | SwitchboardWebSocketServer (int port, const std::unordered_set< std::string > &allowOrigin) |
| | Constructor for SwitchboardWebSocketServer.
|
|
| ~SwitchboardWebSocketServer () |
| | Destructor for SwitchboardWebSocketServer.
|
|
void | start () const |
| | Starts the WebSocket server.
|
|
void | stop () const |
| | Stops the WebSocket server.
|
| bool | isRunning () const |
| | Checks if the server is running.
|
|
int | getPort () const |
| | Returns the port the server is bound to (useful when constructed with port 0).
|
SwitchboardWebSocketServer is a WebSocket server that handles incoming WebSocket connections. It processes JSON-RPC commands and manages WebSocket sessions. This server is designed to work with the Switchboard SDK and provides a way to interact with Switchboard objects over WebSockets.
◆ SwitchboardWebSocketServer()
| switchboard::SwitchboardWebSocketServer::SwitchboardWebSocketServer |
( |
int | port, |
|
|
const std::unordered_set< std::string > & | allowOrigin ) |
|
explicit |
Constructor for SwitchboardWebSocketServer.
- Parameters
-
| port | The port on which the WebSocket server will listen. |
| allowOrigin | The list of origin. |
◆ isRunning()
| bool switchboard::SwitchboardWebSocketServer::isRunning |
( |
| ) |
const |
|
nodiscard |
Checks if the server is running.
- Returns
- True if the server is running, false otherwise.
The documentation for this class was generated from the following file: