diff --git a/gsock.cpp b/gsock.cpp index ed050a9..cc307d1 100644 --- a/gsock.cpp +++ b/gsock.cpp @@ -1723,12 +1723,9 @@ int epoll::mod(vsock& v, int event) ev.data.ptr = &v; return epoll_ctl(_fd, EPOLL_CTL_MOD, v._vp->sfd, &ev); } -int epoll::del(vsock& v, int event) +int epoll::del(vsock& v) { - struct epoll_event ev; - ev.events = event; - ev.data.ptr = &v; - return epoll_ctl(_fd, EPOLL_CTL_DEL, v._vp->sfd, &ev); + return epoll_ctl(_fd, EPOLL_CTL_DEL, v._vp->sfd, NULL); } int epoll::wait(int timeout) { diff --git a/gsock.h b/gsock.h index 078ee45..89b616e 100644 --- a/gsock.h +++ b/gsock.h @@ -354,9 +354,10 @@ class epoll public: epoll(int MaxListen); // EPOLLIN, EPOLLOUT, ... + // Use EPOLLET to set Edge Trigger Mode int add(vsock& v,int event); int mod(vsock& v,int event); - int del(vsock& v,int event); + int del(vsock& v); // >0: Event counts. // =0: Timeout.