Create TCPSession2 for outpubound connections.
This commit is contained in:
1 parent
5c87225c6f
commit
fd70c79282
129 files changed
+1902
-710
No files matched your search
@@ -96,19 +96,22 @@ namespace core {
|
||||
event.data.ptr = socket;
|
||||
event.events = EPOLLIN | EPOLLONESHOT | EPOLLRDHUP | EPOLLET;
|
||||
epoll_ctl(epfd, EPOLL_CTL_ADD, socket->getDescriptor(), &event);
|
||||
// coreutils::Log(coreutils::LOG_DEBUG_4) << "BMAXenable: " << socket->getDescriptor();
|
||||
}
|
||||
|
||||
|
||||
void EPoll::disableSocket(Socket *socket) {
|
||||
epoll_ctl(epfd, EPOLL_CTL_DEL, socket->getDescriptor(), NULL);
|
||||
// coreutils::Log(coreutils::LOG_DEBUG_4) << "BMAXdisable: " << socket->getDescriptor();
|
||||
}
|
||||
|
||||
|
||||
void EPoll::resetSocket(Socket *socket) {
|
||||
struct epoll_event event;
|
||||
event.data.ptr = socket;
|
||||
event.events = EPOLLIN | EPOLLONESHOT | EPOLLRDHUP | EPOLLET;
|
||||
if(socket->needsToWrite())
|
||||
if(socket->needsToWrite() && !socket->shutDown)
|
||||
event.events |= EPOLLWRNORM;
|
||||
epoll_ctl(epfd, EPOLL_CTL_MOD, socket->getDescriptor(), &event);
|
||||
// coreutils::Log(coreutils::LOG_DEBUG_4) << "BMAXreset: " << socket->getDescriptor();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user