Commit 36e364ed authored by jan.koester's avatar jan.koester
Browse files

test

parent 9f796f0c
Loading
Loading
Loading
Loading
+6 −6
Changes for src/event/kqueue.cpp: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ namespace netplus {
        virtual void CloseEventHandler(int pos,const int tid,ULONG_PTR args)=0;

    protected:
        eventapi *_evtapi;
        eventapi *evconnection;
    };

    class poll : public pollapi{
@@ -205,7 +205,7 @@ namespace netplus {
            ccon->lasteventime = time(nullptr);

            struct kevent setevent { 0 };
            setevent.data.ptr = ccon.get();
            setevent.udata = ccon.get();

            int estate = kevent(_pollFD, &setevent, 1, nullptr, 0, nullptr);

@@ -218,7 +218,7 @@ namespace netplus {
        };

        void ReadEventHandler(int pos,const int tid,ULONG_PTR args) {
            con *rcon =  reinterpret_cast<con*>(_Events[pos].data.ptr);
            con *rcon =  reinterpret_cast<con*>(_Events[pos].udata );
            buffer buf(BLOCKSIZE);

            if (!rcon || !rcon->csock) {
@@ -258,7 +258,7 @@ namespace netplus {
        };

        void WriteEventHandler(int pos,const int tid,ULONG_PTR args) {
            con *wcon = reinterpret_cast<con*>(_Events[pos].data.ptr);
            con *wcon = reinterpret_cast<con*>(_Events[pos].udata);

            if(!wcon ||  !wcon->csock){
                    return;
@@ -309,7 +309,7 @@ namespace netplus {
                return;
            }

            con *ccon = reinterpret_cast<con*>(_Events[pos].data.ptr);
            con *ccon = reinterpret_cast<con*>(_Events[pos].udata);

            {
                std::lock_guard<std::mutex> lock(ccon->event_mutex);
@@ -328,7 +328,7 @@ namespace netplus {
                        throw e;
                    }
                }
                _Events[pos].data.ptr = nullptr;
                _Events[pos].udata  = nullptr;

            }