Public Types | |
using | ConVec = std::vector< WebSocketConnectionP > |
using | RegexVector = std::vector< std::regex > |
![]() | |
using | MakeConnection = std::function< WebSocketConnectionP(WebSocketConnection::Internals &, int)> |
using | UnlistenCB = std::function< void()> |
Public Member Functions | |
WebSocketConnection * | force_con (WppHdl) |
void | http_alias (const String &webdir, const String &path) override |
void | http_dir (const String &path) override |
void | listen (const String &host, int port, const UnlistenCB &ulcb) override |
WebSocketConnectionP | make_connection (WppHdl hdl) |
String | map_url (const String &urlpath) override |
void | reset () override |
void | run () |
void | setup (const String &host, int port) |
void | shutdown () override |
String | url () const override |
WebSocketServerImpl (const MakeConnection &make_con, int logflags) | |
WppConnectionP | wppconp (WppHdl hdl) |
void | ws_closed (WebSocketConnectionP) |
void | ws_opened (WebSocketConnectionP) |
Public Attributes | |
std::vector< std::pair< String, String > > | aliases_ |
String | dir_ |
RegexVector | ignores_ |
std::thread * | initialized_thread_ |
int | logflags_ |
MakeConnection | make_con_ |
ConVec | opencons_ |
String | server_url_ |
WppServer | wppserver_ |
Additional Inherited Members | |
![]() | |
static WebSocketServerP | create (const MakeConnection &make, int logflags=0) |
static String | mime_type (const String &ext, bool utf8) |
static String | user_agent () |
static bool | utf8_validate (const std::string &utf8string) |
![]() | |
virtual | ~WebSocketServer () |
![]() | |
static WebSocketConnection::Internals & | internals (WebSocketConnection &c) |
using ConVec = std::vector<WebSocketConnectionP> |
using RegexVector = std::vector<std::regex> |
WebSocketServerImpl | ( | const MakeConnection & | make_con, |
int | logflags | ||
) |
void setup | ( | const String & | host, |
int | port | ||
) |
void run | ( | ) |
WebSocketConnectionP make_connection | ( | WppHdl | hdl | ) |
WebSocketConnection * force_con | ( | WppHdl | ) |
|
overridevirtual |
Implements WebSocketServer.
WppConnectionP wppconp | ( | WppHdl | hdl | ) |
|
overridevirtual |
Implements WebSocketServer.
Implements WebSocketServer.
Implements WebSocketServer.
|
overridevirtual |
Implements WebSocketServer.
|
overridevirtual |
Implements WebSocketServer.
void ws_opened | ( | WebSocketConnectionP | conp | ) |
void ws_closed | ( | WebSocketConnectionP | conp | ) |
|
overridevirtual |
Implements WebSocketServer.
std::thread* initialized_thread_ |
WppServer wppserver_ |
String server_url_ |
String dir_ |
ConVec opencons_ |
RegexVector ignores_ |
MakeConnection make_con_ |
int logflags_ |