Loading src/connection.cpp +1 −1 Changes for src/connection.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ netplus::con::con() { lasteventime = time(nullptr); } netplus::con::con(std::shared_ptr<eventapi>& event) : _eventapi(event) { netplus::con::con(std::shared_ptr<eventapi>& event) : _eventapi(std::move(event)) { state = 0; lasteventime = time(nullptr); } Loading src/event/iocp.cpp +2 −2 Changes for src/event/iocp.cpp: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <iostream> #include <algorithm> #include <chrono> #include <memory> #include <mutex> #include <shared_mutex> #include <cstring> Loading Loading @@ -182,7 +181,8 @@ namespace netplus { curcon = std::make_shared<con>(shared_from_this()); }; event::event(std::shared_ptr<socket>& serversocket, int timeout) : _ServerSocket(serversocket) { event::event(std::shared_ptr<socket>& serversocket, int timeout){ _ServerSocket=serversocket; if (!serversocket) { NetException exp; exp[NetException::Critical] << "server socket empty!"; Loading src/eventapi.h +6 −5 Changes for src/eventapi.h: 6 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -41,10 +41,10 @@ namespace netplus { class eventapi : public std::enable_shared_from_this<eventapi> { public: /*HTTP API Events*/ virtual void RequestEvent(std::shared_ptr <con> &curcon,const int tid,ULONG_PTR args); virtual void ResponseEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args); virtual void ConnectEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args); virtual void DisconnectEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args); virtual void RequestEvent(std::shared_ptr <con> &curcon,const int tid,ULONG_PTR args)=0; virtual void ResponseEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args)=0; virtual void ConnectEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args)=0; virtual void DisconnectEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args)=0; /*memory allocation*/ virtual void CreateConnetion(std::shared_ptr<con> &curon)=0; Loading @@ -56,12 +56,13 @@ namespace netplus { void runEventloop(ULONG_PTR args=0); virtual ~event(); static bool _Run; static bool _Restart; int threads; private: std::shared_ptr<socket> &_ServerSocket; std::shared_ptr<socket> _ServerSocket; int _Timeout; int _pollFD; friend class EventWorker; Loading Loading
src/connection.cpp +1 −1 Changes for src/connection.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ netplus::con::con() { lasteventime = time(nullptr); } netplus::con::con(std::shared_ptr<eventapi>& event) : _eventapi(event) { netplus::con::con(std::shared_ptr<eventapi>& event) : _eventapi(std::move(event)) { state = 0; lasteventime = time(nullptr); } Loading
src/event/iocp.cpp +2 −2 Changes for src/event/iocp.cpp: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <iostream> #include <algorithm> #include <chrono> #include <memory> #include <mutex> #include <shared_mutex> #include <cstring> Loading Loading @@ -182,7 +181,8 @@ namespace netplus { curcon = std::make_shared<con>(shared_from_this()); }; event::event(std::shared_ptr<socket>& serversocket, int timeout) : _ServerSocket(serversocket) { event::event(std::shared_ptr<socket>& serversocket, int timeout){ _ServerSocket=serversocket; if (!serversocket) { NetException exp; exp[NetException::Critical] << "server socket empty!"; Loading
src/eventapi.h +6 −5 Changes for src/eventapi.h: 6 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -41,10 +41,10 @@ namespace netplus { class eventapi : public std::enable_shared_from_this<eventapi> { public: /*HTTP API Events*/ virtual void RequestEvent(std::shared_ptr <con> &curcon,const int tid,ULONG_PTR args); virtual void ResponseEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args); virtual void ConnectEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args); virtual void DisconnectEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args); virtual void RequestEvent(std::shared_ptr <con> &curcon,const int tid,ULONG_PTR args)=0; virtual void ResponseEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args)=0; virtual void ConnectEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args)=0; virtual void DisconnectEvent(std::shared_ptr <con> &curcon,const int tid, ULONG_PTR args)=0; /*memory allocation*/ virtual void CreateConnetion(std::shared_ptr<con> &curon)=0; Loading @@ -56,12 +56,13 @@ namespace netplus { void runEventloop(ULONG_PTR args=0); virtual ~event(); static bool _Run; static bool _Restart; int threads; private: std::shared_ptr<socket> &_ServerSocket; std::shared_ptr<socket> _ServerSocket; int _Timeout; int _pollFD; friend class EventWorker; Loading