Loading src/event/epoll.cpp +5 −1 Changes for src/event/epoll.cpp: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ namespace netplus { } evconnection->DisconnectEvent(*ccon,tid,args); delete ccon->csock; delete reinterpret_cast<con*>(_Events[pos].data.ptr); evconnection->DestroyConnection(ccon); _Events[pos].data.ptr=nullptr; } Loading Loading @@ -407,6 +407,10 @@ namespace netplus { *res=new con(this); } void event::DestroyConnection(con *res){ delete res; } void event::runEventloop(ULONG_PTR args) { NetException exception; Loading src/eventapi.h +2 Changes for src/eventapi.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ namespace netplus { virtual void DisconnectEvent(con &curcon,const int tid, ULONG_PTR args)=0; /*memory allocation*/ virtual void CreateConnection(con **res)=0; virtual void DestroyConnection(con *res)=0; protected: eventapi(){}; }; Loading @@ -65,6 +66,7 @@ namespace netplus { int threads; protected: void CreateConnection(con **res); void DestroyConnection(con *res); event(const event &src); private: socket *_ServerSocket; Loading Loading
src/event/epoll.cpp +5 −1 Changes for src/event/epoll.cpp: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ namespace netplus { } evconnection->DisconnectEvent(*ccon,tid,args); delete ccon->csock; delete reinterpret_cast<con*>(_Events[pos].data.ptr); evconnection->DestroyConnection(ccon); _Events[pos].data.ptr=nullptr; } Loading Loading @@ -407,6 +407,10 @@ namespace netplus { *res=new con(this); } void event::DestroyConnection(con *res){ delete res; } void event::runEventloop(ULONG_PTR args) { NetException exception; Loading
src/eventapi.h +2 Changes for src/eventapi.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ namespace netplus { virtual void DisconnectEvent(con &curcon,const int tid, ULONG_PTR args)=0; /*memory allocation*/ virtual void CreateConnection(con **res)=0; virtual void DestroyConnection(con *res)=0; protected: eventapi(){}; }; Loading @@ -65,6 +66,7 @@ namespace netplus { int threads; protected: void CreateConnection(con **res); void DestroyConnection(con *res); event(const event &src); private: socket *_ServerSocket; Loading