Support for Keepalive Extended Socket Options On Windows
Alan Bateman
Alan.Bateman at oracle.com
Sun Jun 4 14:32:16 UTC 2023
On 04/06/2023 10:49, Daniel Fuchs wrote:
> Hi,
>
> Could we maybe cache the values in the SocketImpl/NIOSocketImpl
> implementation?
>
> IIRC we do something like that for SO_TIMEOUT already, since this
> is handled at NIO level.
>
> If we know the default value then setting one (when the other is
> not set) could set it with the supplied value for the one, and
> the default (or cached value) for the other?
>
> Get would then return the cached value (or possibly default
> value if not set?)
>
> We could also potentially set some sensible defaults when creating
> the socket.
>
Yes, this is what I was suggesting in PR14232 too but it will likely be
a disruptive change. It can be prototyped at least, then we can see how
we could turn it into something that is maintainable. The best outcome
would of course be for Windows to expose the socket options in the same
way as Linux, macOS and others.
-Alan
More information about the net-dev
mailing list