Commit da990e19 authored by jan.koester's avatar jan.koester
Browse files

hotfix sending

parent 0c36570a
Loading
Loading
Loading
Loading
+1 −2
Changes for src/eventapi.h: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ namespace netplus {
            /*Connection Ready to send Data
             * DANGEROUS to burnout your cpu
             *only use this if know what you do!*/
            virtual void sendReady(con *curcon,bool ready)=0;
            void sendReady(con *curcon,bool ready);
        };

        class event : public eventapi{
@@ -58,7 +58,6 @@ namespace netplus {
            event(socket *serversocket);
            void runEventloop();
            static void *WorkerThread(void *wrkevent);
            void sendReady(con *curcon,bool ready);

            virtual ~event();
            static bool _Run;
+9 −9
Changes for src/linux/event.cpp: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -293,6 +293,15 @@ namespace netplus {
            }
        };

        /*Connection Ready to send Data*/
        void sendReady(con* curcon, bool ready) {
            if (ready) {
                setpollEvents(curcon, EPOLLIN | EPOLLOUT);
            } else {
                setpollEvents(curcon, EPOLLIN);
            }
        };

    private:
        int                  _pollFD;
        struct  poll_event  *_Events;
@@ -401,15 +410,6 @@ namespace netplus {
        delete curcon;
    };

    /*Connection Ready to send Data*/
    void event::sendReady(con* curcon, bool ready) {
        if (ready) {
            _Poll->setpollEvents(curcon, EPOLLIN | EPOLLOUT);
        } else {
            _Poll->setpollEvents(curcon, EPOLLIN);
        }
    };

    event::event(socket* serversocket) {
        if (!serversocket) {
            NetException exp;