Loading src/event/iocp.cpp +0 −65 Original line number Diff line number Diff line Loading @@ -25,61 +25,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <iostream> #include <algorithm> #include <chrono> #include <mutex> #include <cstring> #include <signal.h> #include <stdlib.h> #include <stdint.h> #include <winsock2.h> #include <ws2ipdef.h> #include <mswsock.h> #include <strsafe.h> #include <errno.h> #include "socket.h" #include "exception.h" #include "eventapi.h" #include "connection.h" #include <assert.h> #define READEVENT 0 #define SENDEVENT 1 #define BLOCKSIZE 16384 /******************************************************************************* Copyright (c) 2014, Jan Koester jan.koester@gmx.net All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <iostream> #include <algorithm> #include <chrono> Loading Loading @@ -152,10 +97,6 @@ namespace netplus { void *args; }; class EventWorker { private: public: class EventWorker { public: /** Loading Loading @@ -272,12 +213,6 @@ public: } catch (NetException& e) { std::cerr << "IOCP Worker Error: " << e.what() << std::endl; eargs->event->DisconnectEvent(c, tid, args); ======= } catch (NetException& e) { // Ignore non-critical notes, disconnect on actual errors if (e.getErrorType() != NetException::Note) { eargs->event->DisconnectEvent(c, tid, (ULONG_PTR)eargs->args); >>>>>>> 3c87b5c4fc8a9e4711e076e710a2dc74748f2b6f delete pClientContext; } } Loading Loading
src/event/iocp.cpp +0 −65 Original line number Diff line number Diff line Loading @@ -25,61 +25,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <iostream> #include <algorithm> #include <chrono> #include <mutex> #include <cstring> #include <signal.h> #include <stdlib.h> #include <stdint.h> #include <winsock2.h> #include <ws2ipdef.h> #include <mswsock.h> #include <strsafe.h> #include <errno.h> #include "socket.h" #include "exception.h" #include "eventapi.h" #include "connection.h" #include <assert.h> #define READEVENT 0 #define SENDEVENT 1 #define BLOCKSIZE 16384 /******************************************************************************* Copyright (c) 2014, Jan Koester jan.koester@gmx.net All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <iostream> #include <algorithm> #include <chrono> Loading Loading @@ -152,10 +97,6 @@ namespace netplus { void *args; }; class EventWorker { private: public: class EventWorker { public: /** Loading Loading @@ -272,12 +213,6 @@ public: } catch (NetException& e) { std::cerr << "IOCP Worker Error: " << e.what() << std::endl; eargs->event->DisconnectEvent(c, tid, args); ======= } catch (NetException& e) { // Ignore non-critical notes, disconnect on actual errors if (e.getErrorType() != NetException::Note) { eargs->event->DisconnectEvent(c, tid, (ULONG_PTR)eargs->args); >>>>>>> 3c87b5c4fc8a9e4711e076e710a2dc74748f2b6f delete pClientContext; } } Loading