[Bug 10204] New: Incorrectly raised FD_WRITE socket event

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Oct 28 08:40:22 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=10204

           Summary: Incorrectly raised FD_WRITE socket event
           Product: Wine
           Version: 0.9.48.
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: wine-net
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: rraptorr at nails.eu.org


Created an attachment (id=8812)
 --> (http://bugs.winehq.org/attachment.cgi?id=8812)
FD_WRITE event on socket test program

According to MSDN WSAEventSelect function description
(http://msdn2.microsoft.com/en-us/library/ms741576.aspx), FD_WRITE event should
be raised only once after: a) successful connection b) WSAEWOULDBLOCK error
while in nonblocking mode.

MSDN description:
"The FD_WRITE network event is handled slightly differently. An FD_WRITE
network event is recorded when a socket is first connected with
connect/WSAConnect or accepted with accept/WSAAccept, and then after a send
fails with WSAEWOULDBLOCK and buffer space becomes available. Therefore, an
application can assume that sends are possible starting from the first FD_WRITE
network event setting and lasting until a send returns WSAEWOULDBLOCK. After
such a failure the application will find out that sends are again possible when
an FD_WRITE network event is recorded and the associated event object is set."

Unfortunately, it seems that in Wine 0.9.48 (and a few earlier versions too)
this event is raised every time it is possible to write to the socket. I've
created a simple test program (FD_WRITE-test.c) that shows this problem. When
ran on Windows I get:
lNetworkEvents: 2
lNetworkEvents: 0
but when ran on Wine:
lNetworkEvents: 2
lNetworkEvents: 2
which means that FD_WRITE was raised twice and it shouldn't.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list