Switchboard SDK
Loading...
Searching...
No Matches
switchboard::SwitchboardWebSocketServer Class Reference

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>

Public Member Functions

 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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ SwitchboardWebSocketServer()

switchboard::SwitchboardWebSocketServer::SwitchboardWebSocketServer ( int port,
const std::unordered_set< std::string > & allowOrigin )
explicit

Constructor for SwitchboardWebSocketServer.

Parameters
portThe port on which the WebSocket server will listen.
allowOriginThe list of origin.

Member Function Documentation

◆ 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: