From 810c662c9b55908101ca085293c52c3239ef22d1 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 26 Sep 2009 14:12:45 +0000 Subject: 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 --- src/socketengines/socketengine_iocp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/socketengines/socketengine_iocp.cpp') diff --git a/src/socketengines/socketengine_iocp.cpp b/src/socketengines/socketengine_iocp.cpp index e09fb4d0a..c253bf0a6 100644 --- a/src/socketengines/socketengine_iocp.cpp +++ b/src/socketengines/socketengine_iocp.cpp @@ -91,7 +91,7 @@ bool IOCPEngine::AddFd(EventHandler* eh, int event_mask) ServerInstance->Logs->Log("SOCKET",DEBUG, "New fake fd: %u, real fd: %u, address 0x%p", *fake_fd, eh->GetFd(), eh); /* post a write event if there is data to be written */ - if (event_mask & (FD_WANT_POLL_WRITE | FD_WANT_FAST_WRITE)) + if (event_mask & (FD_WANT_POLL_WRITE | FD_WANT_FAST_WRITE | FD_WANT_SINGLE_WRITE)) WantWrite(eh); /* we're all good =) */ @@ -183,7 +183,7 @@ void IOCPEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask) return; /* Post event - write begin */ - if((new_mask & (FD_WANT_POLL_WRITE | FD_WANT_FAST_WRITE)) && !eh->GetExt("windows_writeevent", m_writeEvent)) + if((new_mask & (FD_WANT_POLL_WRITE | FD_WANT_FAST_WRITE | FD_WANT_SINGLE_WRITE)) && !eh->GetExt("windows_writeevent", m_writeEvent)) { ULONG_PTR completion_key = (ULONG_PTR)*fake_fd; Overlapped * ov = new Overlapped(SOCKET_IO_EVENT_WRITE_READY, 0); -- cgit v1.2.3