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

Langer, Christoph christoph.langer at sap.com
Thu Apr 26 10:33:20 UTC 2018


Ok, let's get some more opinions on that... ��

> -----Original Message-----
> From: vyom tewari [mailto:vyom.tewari at oracle.com]
> Sent: Donnerstag, 26. April 2018 12:31
> To: Langer, Christoph <christoph.langer at sap.com>; Chris Hegarty
> <chris.hegarty at oracle.com>; OpenJDK Network Dev list <net-
> dev at openjdk.java.net>
> Subject: Re: RFR:8194298 Add support for per Socket configuration of TCP
> keepalive
> 
> 
> 
> On Thursday 26 April 2018 03:48 PM, Langer, Christoph wrote:
> > Hi Vyom,
> >
> > what about my suggestions for renaming?
> >
> > src/jdk.net/macosx/classes/jdk/net/UnixSocketOptions.java ->
> src/jdk.net/macosx/classes/jdk/net/MacOSXSocketOptions.java
> > src/jdk.net/macosx/native/libextnet/UnixSocketOptions.c ->
> src/jdk.net/macosx/native/libextnet/MacOSXSocketOptions.c
> till now we don't have file name like MacOSX***** so i choose to leave
> as it is but if people think "MacOSXSocketOption" is more appropriate, i
> will change the filename name in my next webrev.
> 
> Thanks,
> Vyom
> >
> > This would be more consistent as we have:
> > src/jdk.net/linux/native/libextnet/LinuxSocketOptions.c
> > src/jdk.net/linux/classes/jdk/net/LinuxSocketOptions.java
> > ...
> > src/jdk.net/solaris/native/libextnet/SolarisSocketOptions.c
> > src/jdk.net/solaris/classes/jdk/net/SolarisSocketOptions.java
> >
> > Thanks
> > Christoph
> >
> >> -----Original Message-----
> >> From: net-dev [mailto:net-dev-bounces at openjdk.java.net] On Behalf Of
> >> vyom tewari
> >> Sent: Montag, 23. April 2018 14:06
> >> To: Chris Hegarty <chris.hegarty at oracle.com>; OpenJDK Network Dev list
> >> <net-dev at openjdk.java.net>
> >> Subject: Re: RFR:8194298 Add support for per Socket configuration of TCP
> >> keepalive
> >>
> >> Hi,
> >>
> >> Please find the latest
> >>
> webrev(http://cr.openjdk.java.net/~vtewari/8194298/webrev0.1/index.htm
> >> l).
> >> 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 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 specification.
> >>>
> >>> 1) Uses a consistent style across all three new options,
> >>>     and is in line with existing extended options.
> >>> 2) Renamed the options slightly, to improve readability
> >>>     ( they don't need to conform to the native option names )
> >>> 3) Reordered them so the build up is more logical
> >>> 4) Removed inheritance from server sockets
> >>> 5) Added standard verbiage about being "platform and
> >>>     system dependent
> >>> 6) Added typical values. I think this is useful, as it
> >>>     gives an idea to the developer, but maybe it could be
> >>>     misleading. Can be dropped if there are concerns.
> >>>
> >>> Can you please confirm that this is accurate, and also
> >>> will leave enough "wriggle" room when additional platform
> >>> support is added.
> >>>
> >>> ---
> >>>
> >>>      /**
> >>>       * Keep-Alive idle time.
> >>>       *
> >>>       * <p> When the {@link
> java.net.StandardSocketOptions#SO_KEEPALIVE
> >>>       * SO_KEEPALIVE} option is enabled, TCP probes a connection that
> >>> has been
> >>>       * idle for some amount of time. The default value for this idle
> >>> period is
> >>>       * system dependent, but is typically 2 hours. The {@code
> >>> TCP_KEEPIDLE}
> >>>       * option can be used to affect this value for a given socket.
> >>>       *
> >>>       * <p> The value of this socket option is an {@code Integer} that
> >>> is the
> >>>       * number of seconds of idle time before keep-alive initiates a
> >>> probe. The
> >>>       * socket option is specific to stream-oriented sockets using the
> >>> TCP/IP
> >>>       * protocol. The exact semantics of this socket option are socket
> >>> type and
> >>>       * system dependent.
> >>>       *
> >>>       *  @since 11
> >>>       */
> >>>      public static final SocketOption<Integer> TCP_KEEPIDLE
> >>>              = new ExtSocketOption<Integer>("TCP_KEEPIDLE",
> >>> Integer.class);
> >>>
> >>>      /**
> >>>       * Keep-Alive retransmission interval time.
> >>>       *
> >>>       * <p> When the {@link
> java.net.StandardSocketOptions#SO_KEEPALIVE
> >>>       * SO_KEEPALIVE} option is enabled, TCP probes a connection that
> >>> has been
> >>>       * idle for some amount of time. If the remote system does not
> >>> respond to a
> >>>       * keep-alive probe, TCP retransmits the probe after some amount
> >>> of time.
> >>>       * The default value for this retransmition interval is system
> >>> dependent,
> >>>       * but is typically 75 seconds. The {@code TCP_KEEPINTERVAL}
> >>> option can be
> >>>       * used to affect this value for a given socket.
> >>>       *
> >>>       * <p> The value of this socket option is an {@code Integer} that
> >>> is the
> >>>       * number of seconds to wait before retransmitting a keep-alive
> >>> probe. The
> >>>       * socket option is specific to stream-oriented sockets using the
> >>> TCP/IP
> >>>       * protocol. The exact semantics of this socket option are socket
> >>> type and
> >>>       * system dependent.
> >>>       *
> >>>       * @since 11
> >>>       */
> >>>      public static final SocketOption<Integer> TCP_KEEPINTERVAL
> >>>              = new ExtSocketOption<Integer>("TCP_KEEPINTERVAL",
> >>> Integer.class);
> >>>
> >>>      /**
> >>>       * Keep-Alive retransmission maximum limit.
> >>>       *
> >>>       * <p> When the {@link
> java.net.StandardSocketOptions#SO_KEEPALIVE
> >>>       * SO_KEEPALIVE} option is enabled, TCP probes a connection that
> >>> has been
> >>>       * idle for some amount of time. If the remote system does not
> >>> respond to a
> >>>       * keep-alive probe, TCP retransmits the probe a certain number of
> >>> times
> >>>       * before a connection is considered to be broken. The default
> >>> value for
> >>>       * this keep-alive probe retransmit limit is system dependent, but is
> >>>       * typically 8. The {@code TCP_KEEPCOUNT} option can be used to
> >>> affect
> >>>       * this value for a given socket.
> >>>       *
> >>>       * <p> The value of this socket option is an {@code Integer} that
> >>> is the
> >>>       * maximum number of keep-alive probes to be sent. The socket
> >>> option is
> >>>       * specific to stream-oriented sockets using the TCP/IP protocol.
> >>> The exact
> >>>       * semantics of this socket option are socket type and system
> >>> dependent.
> >>>       *
> >>>       * @since 11
> >>>       */
> >>>      public static final SocketOption<Integer> TCP_KEEPCOUNT
> >>>              = new ExtSocketOption<Integer>("TCP_KEEPCOUNT",
> >>> Integer.class);
> >>>
> >>> -Chris.



More information about the net-dev mailing list