diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-26 14:12:45 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-26 14:12:45 +0000 |
commit | 810c662c9b55908101ca085293c52c3239ef22d1 (patch) | |
tree | a8a6877615c44dd7fde786e3a770642cab497eff /src/inspsocket.cpp | |
parent | f0bd730338be67a7c5c8fd65ef8b4d9f851860bb (diff) |
Add FD_WANT_SINGLE_WRITE to efficiently replace FD_WANT_POLL_WRITE
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11762 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r-- | src/inspsocket.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 6348d7982..004d679ed 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -97,7 +97,7 @@ BufferedSocketError BufferedSocket::BeginConnect(const irc::sockets::sockaddrs& this->state = I_CONNECTING; - if (!ServerInstance->SE->AddFd(this, FD_WANT_NO_READ | FD_WANT_POLL_WRITE)) + if (!ServerInstance->SE->AddFd(this, FD_WANT_NO_READ | FD_WANT_SINGLE_WRITE)) return I_ERR_NOMOREFDS; this->Timeout = new SocketTimeout(this->GetFd(), this, timeout, ServerInstance->Time()); @@ -414,6 +414,8 @@ void BufferedSocket::DoWrite() this->OnConnected(); if (GetIOHook()) GetIOHook()->OnStreamSocketConnect(this); + else + ServerInstance->SE->ChangeEventMask(this, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE); } this->StreamSocket::DoWrite(); } |