FW: setTrafficClass on server socket; IP_TOS replacement on Windows
Michael.McMahon at Sun.COM
Mon May 18 05:23:24 PDT 2009
Alan Bateman wrote:
>> setTrafficClass on a server socket, so that a certain TOS value will be
>> present in the ACK packet when TCP accepts a connection. This would
>> automatically because all socket flags are inherited during
>> construction of
>> the native socket on the backlog queue, then Java turns off the timeout
>> setting when it constructs a Socket around it during accept() (which is
>> another historical curiousity AFAICS).
>> I can't find my link to the NIO2 documentation but is there way to do
>> in NIO2? Generally speaking it should be possible to (pre)-set every
>> option on a server socket.
> 1. I've just come across a situation where a user needs to call
> There is an RFE tracking this for java.net.ServerSocket:
> To my knowledge it hasn't been a priority (pun not intended), or are
> least it is very rare to find anyone that needs it. Someone from the
> networking group is best to respond to this but I suspect it needs a
> broader re-examination of the QoS topic to see what, if anything,
> should be done.
> QoS isn't in the scope of NIO2/JSR-203 which is why we didn't do
> anything on this topic. However, we did define NetworkChannel and
> retrofitted the existing network channels to implement it. That gives
> us the flexibility to add implementation-specific socket options where
> required (ie: don't need a setter/getter per option as we do with
> classic networking).
We did something similar before in ServerSocket with the
But if this is required for NIO, then adding it to ServerSocket, is
probably not what you want.
More information about the net-dev