Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-16 Thread vyom tewari
Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.6/index.html). I renamed the macosx files to "MacOSXSocketOptions.java&MacOSXSocketOptions.c". Our internal tests are clean. Thanks, Vyom On Tuesday 15 May 2018 03:13 PM, Alan Bateman wrote: On 15/05/201

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-15 Thread vyom tewari
On Tuesday 15 May 2018 03:13 PM, Alan Bateman wrote: On 15/05/2018 08:35, Langer, Christoph wrote: I’m asking because I’m planning to add some AIX options and will have to choose a name for this implementation eventually. @Alan: What do you think? Yes, I agree it should be renamed. Vyom

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-15 Thread Alan Bateman
On 15/05/2018 08:35, Langer, Christoph wrote: I’m asking because I’m planning to add some AIX options and will have to choose a name for this implementation eventually. @Alan: What do you think? Yes, I agree it should be renamed. Vyom has just finalized the CSR so I assume the final points

RE: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-15 Thread Langer, Christoph
: RFR:8194298 Add support for per Socket configuration of TCP keepalive Hi All, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.5/index.html). Only change with the previous wrev(04) is i removed "socket type" as Alan suggested and used the default c

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-14 Thread Alan Bateman
On 14/05/2018 16:30, vyom tewari wrote: Hi All, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.5/index.html). Only change with the previous wrev(04) is i removed "socket type" as Alan suggested and used the default  constructor (Set> options = new HashSe

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-14 Thread vyom tewari
Hi All, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.5/index.html). Only change with the previous wrev(04) is i removed "socket type" as Alan suggested and used the default  constructor (Set> options = new HashSet<>();) in ExtendedSocketOptions.java Than

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-13 Thread Alan Bateman
On 12/05/2018 10:21, vyom tewari wrote: : Thanks for review, please find the updated webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.4/index.html). I've skimmed through this webrev. The spec for the new options mostly look good but all three include "The exact semantics of this so

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-12 Thread vyom tewari
On Saturday 12 May 2018 04:14 PM, Ivan Gerasimov wrote: Thanks Vyom! I like it much better now. The last minorish comment: src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java Set> options = new HashSet<>(5); Please note that the constructor of HashSet wants the initial capacity as

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-12 Thread Ivan Gerasimov
Thanks Vyom! I like it much better now. The last minorish comment: src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java Set> options = new HashSet<>(5); Please note that the constructor of HashSet wants the initial capacity as the argument, not the expected number of elements. So in t

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-12 Thread vyom tewari
Hi Ivan, Thanks for review, please find the updated webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.4/index.html). Please find my answers in-line. Thanks, vyom On Saturday 12 May 2018 11:15 AM, Ivan Gerasimov wrote: Hi Vyom! 1) src/java.base/share/classes/sun/net/ext/ExtendedS

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-11 Thread Ivan Gerasimov
Hi Vyom! 1) src/java.base/share/classes/sun/net/ext/ExtendedSocketOptions.java Thank you for fixing ExtendingSocketOption.options0(). It may be better to make the returned set unmodifiable, and then Collectors.toUnmodifiableSet could be used for convenience: return options.stream() .f

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-11 Thread vyom tewari
thanks all for review, please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.3/index.html). I address most of the  review comments. Vyom On Saturday 12 May 2018 12:01 AM, Chris Hegarty wrote: On 11 May 2018, at 01:04, Alan Bateman wrote: On 10/05/2018 16:21, vyo

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-11 Thread Alan Bateman
On 11/05/2018 19:31, Chris Hegarty wrote: : P.S. A separate issue, but when reviewing this it reminded me that we should deprecate-for-removal jdk/net/Sockets.java. It’s functionality is already supported by a standard API. I think just the methods rather than the class. Lucy Yingqi is working

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-11 Thread Chris Hegarty
On 11 May 2018, at 01:04, Alan Bateman wrote: > > On 10/05/2018 16:21, vyom tewari wrote: >> Hi, >> >> Please find the latest >> webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.2/index.html) >> ... > It would be better if the channel implementation didn't static import > ExtendedSo

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-11 Thread Alan Bateman
On 10/05/2018 16:21, vyom tewari wrote: Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.2/index.html). I incorporated most of the review comments. Chris as you suggested in below mail i did not added the note for upper-bound because values are also OS sp

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-10 Thread Ivan Gerasimov
Hi Vyom! A few random comments: 1) src/java.base/share/classes/sun/net/ext/ExtendedSocketOptions.java Collections.emptySet() produces an immutable set, so it must not be possible to add elements to it. Is there a test that verifies that ExtendedSocketOption.options(short) works as expected

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-05-10 Thread vyom tewari
Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.2/index.html). I incorporated most of the review comments. Chris as you suggested in below mail i did not added the note for upper-bound because values are also OS specific. Thanks, Vyom On Monday 23 Ap

RE: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-26 Thread Langer, Christoph
t;> -Original Message- > >> From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of > >> vyom tewari > >> Sent: Montag, 23. April 2018 14:06 > >> To: Chris Hegarty ; OpenJDK Network Dev list > >> > >> Subject: Re: RFR:81

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-26 Thread vyom tewari
-Original Message- From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of vyom tewari Sent: Montag, 23. April 2018 14:06 To: Chris Hegarty ; OpenJDK Network Dev list Subject: Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive Hi, Please find t

RE: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-26 Thread Langer, Christoph
istoph > -Original Message- > From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of > vyom tewari > Sent: Montag, 23. April 2018 14:06 > To: Chris Hegarty ; OpenJDK Network Dev list > > Subject: Re: RFR:8194298 Add support for per Socket configuration

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-24 Thread vyom tewari
Hi Alan, Thanks for review comments, please find my answers inline. Vyom On Monday 23 April 2018 06:04 PM, Alan Bateman wrote: On 23/04/2018 13:05, vyom tewari wrote: Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.1/index.html). I incorporated  most

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-23 Thread Chris Hegarty
On 23/04/18 13:34, Alan Bateman wrote: On 23/04/2018 13:05, vyom tewari wrote: Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.1/index.html). I incorporated most of the review comments. This looks much better but I think the second paragraph of the spec

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-23 Thread Alan Bateman
On 23/04/2018 13:05, vyom tewari wrote: Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.1/index.html). I incorporated  most of the review comments. This looks much better but I think the second paragraph of the spec of each option needs to be inverted so

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-23 Thread vyom tewari
Hi, Please find the latest webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.1/index.html). I incorporated  most of the review comments. Thanks, Vyom On Wednesday 18 April 2018 07:44 PM, Chris Hegarty wrote: Vyom, On 13/04/18 10:50, vyom tewari wrote: Hi All, Please review the

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-18 Thread vyom tewari
Hi Chris, On Wednesday 18 April 2018 07:44 PM, Chris Hegarty wrote: Vyom, On 13/04/18 10:50, vyom tewari wrote: Hi All, Please review the below code. BugId    : https://bugs.openjdk.java.net/browse/JDK-8194298 webrev : http://cr.openjdk.java.net/~vtewari/8194298/webrev0.0/index.html Her

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-18 Thread Chris Hegarty
Vyom, On 13/04/18 10:50, vyom tewari wrote: Hi All, Please review the below code. BugId: https://bugs.openjdk.java.net/browse/JDK-8194298 webrev : http://cr.openjdk.java.net/~vtewari/8194298/webrev0.0/index.html Here is some proposed wording for the JDK-specific extended socket options

RE: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-16 Thread Langer, Christoph
Hi Vyom, I had a quick glance through your changes. Apart from the suggestions you've already got (use snprintf instead of string concatenation, method ordering...), I think "src/jdk.net/macosx/classes/jdk/net/UnixSocketOptions.java" and " src/jdk.net/macosx/native/libextnet/UnixSocketOptions.

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-15 Thread vyom tewari
On Sunday 15 April 2018 01:33 PM, Alan Bateman wrote: On 14/04/2018 08:09, Alan Bateman wrote: : Can you update SocketChannel/SocketOptionTests.java to ensure that SocketChannel is test? We also need to ensure that the new options don't show up in the supportedOptions returned by the channe

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-15 Thread Alan Bateman
On 14/04/2018 08:09, Alan Bateman wrote: : Can you update SocketChannel/SocketOptionTests.java to ensure that SocketChannel is test? We also need to ensure that the new options don't show up in the supportedOptions returned by the channels that don't support these new options. Just on this po

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-14 Thread Alan Bateman
On 13/04/2018 10:50, vyom tewari wrote: Hi All, Please review the below code. BugId    : https://bugs.openjdk.java.net/browse/JDK-8194298 webrev : http://cr.openjdk.java.net/~vtewari/8194298/webrev0.0/index.html Currently Java supports SO_KEEPALIVE, whose default value is 7200 seconds which

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-13 Thread vyom tewari
On Saturday 14 April 2018 01:40 AM, Bernd Eckenfels wrote: Hello, Glad to see progress on this, much needed. thanks I wonder if there is a better way for safe and dynamic string concatenation in the JDK, this errmsg[56] looks scary. sure, i will fix it. Did you tried to support it on Wi

Re: RFR:8194298 Add support for per Socket configuration of TCP keepalive

2018-04-13 Thread Bernd Eckenfels
Hello, Glad to see progress on this, much needed. I wonder if there is a better way for safe and dynamic string concatenation in the JDK, this errmsg[56] looks scary. Did you tried to support it on Windows, even if it does not support all 3 parameters it might be important to be available (I t