Switchboard SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
SwitchboardWebSocketServer.hpp
1
//
2
// SwitchboardWebSocketServer.hpp
3
// SwitchboardSDK
4
//
5
// Copyright © 2026 Synervoz. All rights reserved.
6
//
7
8
#pragma once
9
10
#include "export.h"
11
12
#include <memory>
13
#include <unordered_set>
14
15
namespace
switchboard {
16
22
class
SWITCHBOARDSDK_EXPORT
SwitchboardWebSocketServer
{
23
public
:
29
explicit
SwitchboardWebSocketServer
(
int
port,
const
std::unordered_set<std::string>& allowOrigin);
30
34
~SwitchboardWebSocketServer
();
35
39
void
start
()
const
;
40
44
void
stop
()
const
;
45
50
[[nodiscard]]
bool
isRunning
()
const
;
51
52
private
:
53
class
Impl;
54
std::unique_ptr<Impl> impl;
55
};
56
57
}
switchboard::SwitchboardWebSocketServer::~SwitchboardWebSocketServer
~SwitchboardWebSocketServer()
Destructor for SwitchboardWebSocketServer.
switchboard::SwitchboardWebSocketServer::isRunning
bool isRunning() const
Checks if the server is running.
switchboard::SwitchboardWebSocketServer::start
void start() const
Starts the WebSocket server.
switchboard::SwitchboardWebSocketServer::stop
void stop() const
Stops the WebSocket server.
switchboard::SwitchboardWebSocketServer::SwitchboardWebSocketServer
SwitchboardWebSocketServer(int port, const std::unordered_set< std::string > &allowOrigin)
Constructor for SwitchboardWebSocketServer.
SwitchboardSDK
include
switchboard
SwitchboardWebSocketServer.hpp
Generated by
1.17.0