mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-01 19:17:47 +00:00
New faster and scalable WebSocket engine.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user