JDK-8036681 : Ability to set TOS in IPv6/non blocking IO/TOS field prior to binding socket
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7u51
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2014-03-05
  • Updated: 2019-04-01
  • Resolved: 2014-11-14
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Ability to set TOS in IPv6/non blocking IO/TOS field prior to binding socket

1. to set TOS in IPv6. 
2. to set TOS in non-blocking IO. 
3. to set TOS field prior to binding the socket. 


Comments
JDK-8029607 seems to solve the issues raised there. That functionality has been backported to the JDK 7u codeline. TOS field can be set with options like : NIO sockets - via the API already present : e.g. : ServerSocketChannel server = ServerSocketChannel.open(); server.setOption(StandardSocketOptions.IP_TOS, 128); java.net Sockets : e.g. ServerSocket ss = new ServerSocket(); jdk.net.Sockets.setOption(ss, java.net.StandardSocketOptions.IP_TOS, 128);
14-11-2014

JDK-8036979 added support java.net.SocketOption<> in java.net socket types.
01-05-2014

We did something similar to this before with the addition of ServerSocket.setReceiveBufferSize() which also needs to be called prior to binding. In this case though, it might be worth waiting until the support for extendible SocketOptions are added to java.net. Then the API will support requirements like this, and it's just a matter of making the implementation do it.
07-03-2014

I've found two other open RFEs for similar requests (JDK-8029607,JDK-6727157) and would prefer to let Dev decide which one should be closed, as the scopes are not equal.
05-03-2014

Dmeetry - there are other enhancements open for this the same and I suspect you can close this new one as a dup.
05-03-2014

This is current limitations in implementation in 7 and upcoming 8. http://download.java.net/jdk8/docs/api/java/net/StandardSocketOptions.html#IP_TOS
05-03-2014