apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: How to detect is the socket is still open
Date Thu, 03 Aug 2006 22:30:00 GMT
Mladen Turk wrote:
> The point is that read with 0 timeout can return data,
> and that breaks any attempt to check the status of the socket
> without duplicating code for each protocol (http, ajp, ftp, etc...).

-1 because that tweaks the socket stack's behavior.  Don't pull anything
off the socket until we are ready to process it.  Certainly not as a 'poll'
for disconnection.

> Now, this works most of the time on unixes, but it fails for windows
> if connection goes to the localhost.

Trying to work around winsock loopback drivers is an exercise in futility,
and certainly not worth changing any standardized socket behavior.

MS's loopback driver authors clearly don't know what they are doing, just
review the MSKB problem tickets if you doubt this.


View raw message