<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
Hi Alan and Daniel,
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">Agreed, having Windows support the keepalive options as it's done on other platforms would be the best. But, lobbying them for that change would be extremely difficult as it would be very significant change that impacts the whole
 platform.</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">What defaults values do you guys have in mind? I'm still hesitating on persisting default values because the default values can vary between machines.</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">Thanks,</div>
Terry<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Alan Bateman <Alan.Bateman@oracle.com><br>
<b>Sent:</b> June 4, 2023 7:32 AM<br>
<b>To:</b> Daniel Fuchs <daniel.fuchs@oracle.com>; Terry Chow (Simba Technologies Inc) <v-terrychow@microsoft.com>; net-dev@openjdk.org <net-dev@openjdk.org><br>
<b>Subject:</b> [EXTERNAL] Re: Support for Keepalive Extended Socket Options On Windows</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[You don't often get email from alan.bateman@oracle.com. Learn why this is important at
<a href="https://aka.ms/LearnAboutSenderIdentification">https://aka.ms/LearnAboutSenderIdentification</a> ]<br>
<br>
On 04/06/2023 10:49, Daniel Fuchs wrote:<br>
> Hi,<br>
><br>
> Could we maybe cache the values in the SocketImpl/NIOSocketImpl<br>
> implementation?<br>
><br>
> IIRC we do something like that for SO_TIMEOUT already, since this<br>
> is handled at NIO level.<br>
><br>
> If we know the default value then setting one (when the other is<br>
> not set) could set it with the supplied value for the one, and<br>
> the default (or cached value) for the other?<br>
><br>
> Get would then return the cached value (or possibly default<br>
> value if not set?)<br>
><br>
> We could also potentially set some sensible defaults when creating<br>
> the socket.<br>
><br>
Yes, this is what I was suggesting in PR14232 too but it will likely be<br>
a disruptive change. It can be prototyped at least, then we can see how<br>
we could turn it into something that is maintainable. The best outcome<br>
would of course be for Windows to expose the socket options in the same<br>
way as Linux, macOS and others.<br>
<br>
-Alan<br>
</div>
</span></font></div>
</body>
</html>