New faster and scalable WebSocket engine.

This commit is contained in:
stephb9959
2021-11-01 11:29:07 -07:00
parent a8afcab483
commit bc2d2b6911
2 changed files with 7 additions and 1 deletions

View File

@@ -28,7 +28,9 @@ namespace OpenWifi {
Poco::Net::WebSocket WS(*Request, *Response);
Logger_.information("WebSocket connection established.");
auto Id = MicroService::instance().CreateUUID();
std::cout << __func__ << ":" << __LINE__ << std::endl;
new WebSocketClient(WS,Id,Logger_);
std::cout << __func__ << ":" << __LINE__ << std::endl;
}
catch (...) {
std::cout << "Cannot create websocket client..." << std::endl;

View File

@@ -38,6 +38,7 @@ namespace OpenWifi {
};
void WebSocketClient::OnSocketError(const Poco::AutoPtr<Poco::Net::ErrorNotification> &pNf) {
std::cout << __func__ << ":" << __LINE__ << std::endl;
delete this;
}
@@ -97,11 +98,14 @@ namespace OpenWifi {
}
}
if(Done)
if(Done) {
std::cout << __func__ << ":" << __LINE__ << std::endl;
delete this;
}
}
void WebSocketClient::OnSocketShutdown(const Poco::AutoPtr<Poco::Net::ShutdownNotification> &pNf) {
std::cout << __func__ << ":" << __LINE__ << std::endl;
delete this;
}