Loading src/event/iocp.cpp +7 −3 Changes for src/event/iocp.cpp: 7 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ namespace netplus { class poll { public: poll(HANDLE iocp, std::shared_ptr<eventapi> api, std::shared_ptr <socket> ssock) poll(HANDLE iocp, std::shared_ptr<eventapi> &api, std::shared_ptr <socket> &ssock) : g_iocp(iocp), g_eventapi(api), g_serversocket(ssock) { } Loading Loading @@ -152,7 +152,7 @@ namespace netplus { }; void eventapi::CreateConnetion(std::shared_ptr<con> &curcon) { curcon = std::make_shared<con>(shared_from_this()); curcon = std::shared_ptr<con>(new con(shared_from_this()),std::default_delete<con>()); }; event::event(std::shared_ptr<socket>& serversocket, int timeout){ Loading Loading @@ -260,13 +260,17 @@ namespace netplus { catch (NetException& e) { std::cerr << e.what() << std::endl; if (e.getErrorType() != NetException::Note) { if (WSACloseEvent(pClientContext)) { delete pClientContext; } } continue; } catch (...) { std::cerr << "unknown error close coonection !" << std::endl; if (WSACloseEvent(pClientContext)) { delete pClientContext; } continue; } Loading Loading @@ -297,7 +301,7 @@ namespace netplus { memset(&olOverlap, 0, sizeof(olOverlap)); poll evpoll(iocp,std::shared_ptr<event>(this), _ServerSocket); poll evpoll(iocp,shared_from_this(), _ServerSocket); eargs->ssocket = _ServerSocket; eargs->event = this; Loading src/socket.h +2 −2 File changed.Contains only whitespace changes. Show changes Loading
src/event/iocp.cpp +7 −3 Changes for src/event/iocp.cpp: 7 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ namespace netplus { class poll { public: poll(HANDLE iocp, std::shared_ptr<eventapi> api, std::shared_ptr <socket> ssock) poll(HANDLE iocp, std::shared_ptr<eventapi> &api, std::shared_ptr <socket> &ssock) : g_iocp(iocp), g_eventapi(api), g_serversocket(ssock) { } Loading Loading @@ -152,7 +152,7 @@ namespace netplus { }; void eventapi::CreateConnetion(std::shared_ptr<con> &curcon) { curcon = std::make_shared<con>(shared_from_this()); curcon = std::shared_ptr<con>(new con(shared_from_this()),std::default_delete<con>()); }; event::event(std::shared_ptr<socket>& serversocket, int timeout){ Loading Loading @@ -260,13 +260,17 @@ namespace netplus { catch (NetException& e) { std::cerr << e.what() << std::endl; if (e.getErrorType() != NetException::Note) { if (WSACloseEvent(pClientContext)) { delete pClientContext; } } continue; } catch (...) { std::cerr << "unknown error close coonection !" << std::endl; if (WSACloseEvent(pClientContext)) { delete pClientContext; } continue; } Loading Loading @@ -297,7 +301,7 @@ namespace netplus { memset(&olOverlap, 0, sizeof(olOverlap)); poll evpoll(iocp,std::shared_ptr<event>(this), _ServerSocket); poll evpoll(iocp,shared_from_this(), _ServerSocket); eargs->ssocket = _ServerSocket; eargs->event = this; Loading