| helics 3.6.1

Public Member Functions | Static Public Attributes | List of all members
helics::apps::WebServer Class Reference

`#include <helicsWebServer.hpp>`

Inheritance diagram for helics::apps::WebServer:

## Public Member Functions
| WebServer (std::string_view server_name)
virtual void | startServer (const nlohmann::json *val, const std::shared_ptr< TypedBrokerServer > &ptr) override
virtual void | stopServer () override
virtual void | processArgs (std::string_view args) override
void | enableHttpServer (bool enabled)
void | enableWebSocketServer (bool enabled)

## Static Public Attributes
static constexpr int | defaultHttpPort {43542}
| default port for the HTTP web server
static constexpr int | defaultWebSocketPort {43543}
| default port for the Websocket server

## Additional Inherited Members
Static Protected Member Functions inherited from helics::apps::TypedBrokerServer
static ActionMessage | generateMessageResponse (const ActionMessage &rxcmd, portData &pdata, CoreType ctype)
static int | getOpenPort (portData &pd)
static void | assignPort (portData &pd, int pnumber, std::shared_ptr< Broker > &brk)
static void | logMessage (std::string_view message)

## Detailed Description

a virtual class to use as a base for broker servers of various types

## Member Function Documentation

## ◆ enableHttpServer()

void helics::apps::WebServer::enableHttpServer | ( | bool | enabled | ) |
| inline

enable the HTTP server

## ◆ enableWebSocketServer()

void helics::apps::WebServer::enableWebSocketServer | ( | bool | enabled | ) |
| inline

enable the websocket server

## ◆ processArgs()

void helics::apps::WebServer::processArgs | ( | std::string_view | args | ) |
| override virtual

process any command line arguments

Reimplemented from helics::apps::TypedBrokerServer.

## ◆ startServer()

void helics::apps::WebServer::startServer | ( | const nlohmann::json * | val,
|  | const std::shared_ptr< TypedBrokerServer > & | ptr
| ) |  |
| override virtual

start the server

Implements helics::apps::TypedBrokerServer.

## ◆ stopServer()

void helics::apps::WebServer::stopServer | ( |  | ) |
| override virtual

stop the server

Implements helics::apps::TypedBrokerServer.

The documentation for this class was generated from the following files:

- helicsWebServer.hpp
- helicsWebServer.cpp