Hi Sreeram,
>> I am using a non-blocking socket and i registered a handler for WRITE_MASK,
>> but handle_output() does not seem to get called on win32
>>
>>
>> It fails on the following platform :
>>
>> WinNT 4.0 SP6
>> MSVC++ 6 (SP5),
>> ACE 5.2.1
>>
>> The same identical code works as expected on Linux :
>>
>> Redhat Linux 7.2
>> ACE 5.2.1
>>
>>
>> Tracing thru the code in win32, shows that the code is blocked on
>> 'WaitForMultipleObjectsEx'.
>>
>> Maybe this API call does not get notified when sockets become ready for
>> writing ( i.e say flow control has reduced ).
>>
>> Any help would be appreciated
It's hard to say exactly what's going on without seeing your code.
However, there's a discussion in Chapter 4 of C++NPv2
<www.cs.wustl.edu/~schmidt/ACE/book2/> that might help you out. Since
that book won't be published until the fall, here's the excerpt:
----------------------------------------
WRITE_MASK semantics different from select(). When a socket can send
more data, select() detects a WRITE condition. It will continue to
detect this condition as long as the socket remains writeable, that
is, until it becomes flow-controlled. In contrast, the Windows
WSAEventSelect() function only sets the WRITE event under two
conditions:
. When the socket is first connected, whether passively or actively
. When the socket transitions from flow-controlled to writeable
When relying on WRITE events using the ACE_WFMO_Reactor, you must
therefore continue to write until the connection closes or the socket
becomes flow controlled, i.e., a send fails with EWOULDBLOCK. If this
behavior is undesirable, you might consider choosing the
ACE_Select_Reactor as the ACE_Reactor implementation on Windows since
it has the same WRITE_MASK semantics as on UNIX platforms.
----------------------------------------
Take care,
Doug
--
Dr. Douglas C. Schmidt, Associate Professor TEL: (949) 824-1901
Dept of Electrical & Computer Engineering FAX: (949) 824-2321
616E Engineering Tower WEB: www.ece.uci.edu/~schmidt/
University of California, Irvine, 92697-2625 NET: schmidt@...