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. Bill
