Bruno Jesus 00cpxxx at gmail.com
Tue Aug 30 06:52:52 CDT 2011

This discussion is related to the test failing in bug 21271:

The SIO_KEEPALIVE_VALS message on windows takes parameters as
miliseconds, on some other systems there are the equivalent
TCP_KEEPIDLE/TCP_KEEPINTVL which takes the parameters as seconds. To
solve this there is a division by 1000 on wine source code but the
problem is that values < 1000 become 0 making the setsockopt function
return error.

Is it reasonable to do a check to see if the result of the division is
zero and then set the variable to one so we can get closer to the
windows implementation and not fail the setsockopt function? It will
obviously not match 100% the windows implementation but it seems to be
as close as we can get and as far as I can think it's better for the
applications to receive a one second keepalive then never receiving

SIO_KEEPALIVE_VALS bibliography (read specially the remarks):

TCP_KEEPIDLE/TCP_KEEPINTVL bibliography (almost no information, sorry)

Wine source code link (ignore the fact that there may be a read on
address zero that is only checked later):

I have tested locally and will try to add tests to wine git but I
prefered to start the discussion first. If I have missed something or
this was already discussed accept my apologies in advance.

Best wishes,

More information about the wine-devel mailing list