WebFramework v3.0.12
Web framework for C++.
|
Main class of framework. More...
#include <WebFramework.h>
Public Member Functions | |
WebFramework (const utility::Config &webFrameworkConfig) | |
WebFramework (const std::filesystem::path &webFrameworkConfigPath) | |
void | start (bool wait=false, const std::function< void()> &onStartServer=[]() {}) |
Start server. | |
void | stop (bool wait=true) |
Stop server. | |
void | kick (const std::string &ip) const |
Kick specific client. | |
std::vector< std::string > | getClientsIp () const |
Get ip addresses of all currently connected clients. | |
bool | isServerRunning () const |
Is server running. | |
const json::JSONParser & | getCurrentConfiguration () const |
Getter for currentConfiguration. | |
Static Public Member Functions | |
static std::string_view | getWebFrameworkVersion () |
Get current WebFramework version. | |
static bool | getUseHTTPS () |
Is server use HTTPS. | |
Main class of framework.
All initializations go through this class
Definition at line 15 of file WebFramework.h.
framework::WebFramework::WebFramework | ( | const utility::Config & | webFrameworkConfig | ) |
Definition at line 231 of file WebFramework.cpp.
vector< string > framework::WebFramework::getClientsIp | ( | ) | const |
Get ip addresses of all currently connected clients.
Definition at line 292 of file WebFramework.cpp.
const json::JSONParser & framework::WebFramework::getCurrentConfiguration | ( | ) | const |
Getter for currentConfiguration.
Definition at line 312 of file WebFramework.cpp.
|
static |
|
static |
Get current WebFramework version.
Definition at line 22 of file WebFramework.cpp.
bool framework::WebFramework::isServerRunning | ( | ) | const |
void framework::WebFramework::kick | ( | const std::string & | ip | ) | const |
Kick specific client.
ip | client's address |
Definition at line 287 of file WebFramework.cpp.
void framework::WebFramework::start | ( | bool | wait = false, |
const std::function< void()> & | onStartServer = []() {} ) |
Start server.
wait | Wait until server stop |
onStartServer | On start server callback |
Definition at line 277 of file WebFramework.cpp.
void framework::WebFramework::stop | ( | bool | wait = true | ) |