10 #include "TypedBrokerServer.hpp"
19 namespace helics::apps {
31 explicit WebServer(std::string_view server_name): mName(server_name) {}
34 const std::shared_ptr<TypedBrokerServer>& ptr)
override;
38 virtual void processArgs(std::string_view args)
override;
45 void mainLoop(std::shared_ptr<WebServer> keepAlive);
46 std::atomic<bool> running{
false};
47 std::shared_ptr<IocWrapper> context;
48 std::thread mainLoopThread;
49 std::mutex threadGuard;
51 const Json::Value* config{
nullptr};
52 const std::string mName;
54 std::string mHttpAddress;
56 std::string mWebsocketAddress;
58 bool mHttpEnabled{
false};
59 bool mWebsocketEnabled{
false};
60 int mInterfaceNetwork{0};
61 std::atomic<bool> executing{
false};
Definition: TypedBrokerServer.hpp:24
Definition: helicsWebServer.hpp:24
static constexpr int defaultHttpPort
default port for the HTTP web server
Definition: helicsWebServer.hpp:27
static constexpr int defaultWebSocketPort
default port for the Websocket server
Definition: helicsWebServer.hpp:29
virtual void stopServer() override
Definition: helicsWebServer.cpp:1030
void enableHttpServer(bool enabled)
Definition: helicsWebServer.hpp:40
virtual void startServer(const Json::Value *val, const std::shared_ptr< TypedBrokerServer > &ptr) override
Definition: helicsWebServer.cpp:1005
virtual void processArgs(std::string_view args) override
Definition: helicsWebServer.cpp:949
void enableWebSocketServer(bool enabled)
Definition: helicsWebServer.hpp:42