[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: RFC - ws2_32/socket.c: SIO_KEEPALIVE_VALS vs
From:       Juan Lang <juan.lang () gmail ! com>
Date:       2011-08-30 15:38:56
Message-ID: CAP8JoYiOPQJsZOQAKDLo7pAfTC2hzrvPNDfKZg7YawrOd+Lrvw () mail ! gmail ! com
[Download RAW message or body]

Hi Bruno,

> 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

Yes, it's reasonable.  I think API-level compatibility is generally
more important to appilcations than timing-level compatibility.
I.o.w. function(args) -> result should be invariant across Windows and
Wine.  The time required to before function(args) yields result is
oftentimes not guaranteed in Windows, so a little fuzziness here is
often okay.
--Juan


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic