mirror of
https://github.com/Kiritow/GSock.git
synced 2024-03-22 13:10:51 +08:00
Fix bugs in epoll
This commit is contained in:
parent
fee6ee7972
commit
aa4e6fe598
|
@ -1080,14 +1080,17 @@ epoll::~epoll()
|
||||||
}
|
}
|
||||||
int epoll::add(const vsock& v,epoll_event* event)
|
int epoll::add(const vsock& v,epoll_event* event)
|
||||||
{
|
{
|
||||||
|
event->data.fd=_vp->sfd;
|
||||||
return epoll_ctl(_fd,EPOLL_CTL_ADD,v._vp->sfd,event);
|
return epoll_ctl(_fd,EPOLL_CTL_ADD,v._vp->sfd,event);
|
||||||
}
|
}
|
||||||
int epoll::mod(const vsock& v,epoll_event* event)
|
int epoll::mod(const vsock& v,epoll_event* event)
|
||||||
{
|
{
|
||||||
|
event->data.fd=_vp->sfd;
|
||||||
return epoll_ctl(_fd,EPOLL_CTL_MOD,v._vp->sfd,event);
|
return epoll_ctl(_fd,EPOLL_CTL_MOD,v._vp->sfd,event);
|
||||||
}
|
}
|
||||||
int epoll::del(const vsock& v,epoll_event* event)
|
int epoll::del(const vsock& v,epoll_event* event)
|
||||||
{
|
{
|
||||||
|
event->data.fd=_vp->sfd;
|
||||||
return epoll_ctl(_fd,EPOLL_CTL_DEL,v._vp->sfd,event);
|
return epoll_ctl(_fd,EPOLL_CTL_DEL,v._vp->sfd,event);
|
||||||
}
|
}
|
||||||
int epoll::wait(epoll_event* events,int maxsize,int timeout)
|
int epoll::wait(epoll_event* events,int maxsize,int timeout)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user