Commit 917e933f authored by jan.koester's avatar jan.koester
Browse files

new api

parent 386866b1
Loading
Loading
Loading
Loading
+3 −4
Changes for src/event/epoll.cpp: 3 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -157,9 +157,9 @@ namespace netplus {
        void ConnectEventHandler(int pos,const int tid,ULONG_PTR args)  {
            NetException exception;

            con  *ccon=nullptr;
            std::unique_ptr<con>  ccon;

            evconnection->CreateConnection(&ccon);
            evconnection->CreateConnection(ccon);

            if(_ServerSocket->_Type==sockettype::TCP){
                ccon->csock=std::make_shared<tcp>(-1);
@@ -182,7 +182,7 @@ namespace netplus {

            struct epoll_event setevent { 0 };
            setevent.events =  EPOLLIN | EPOLLONESHOT;
            setevent.data.ptr = ccon;
            setevent.data.ptr = ccon.get();

            int estate = epoll_ctl(_pollFD, EPOLL_CTL_ADD,ccon->csock->fd(), &setevent);

@@ -278,7 +278,6 @@ namespace netplus {
                        throw except;
                    }
                    evconnection->DisconnectEvent(*ccon,tid,args);
                    evconnection->DestroyConnection(ccon);
                    _Events[pos].data.ptr=nullptr;

                }