Esmond Pitt FACS wrote:
Alan

[I'm not subscribed to net-dev so I'm not sure if this will get there ;-)]
I assume it will need the moderator (Michael?) to approve.

1. I've just come across a situation where a user needs to call
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 occur
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 that
in NIO2? Generally speaking it should be possible to (pre)-set every socket
option on a server socket.
There is an RFE tracking this for java.net.ServerSocket:
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6727157

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).

The user situation itself is more or less nonsense, a brain-dead router
configuration that rejects ACKs without a certain non-zero TOS setting, so
writing real applications behind it is more or less impossible, especially
since our friends in Seattle don't support IP_TOS anyway, but regardless of
that the principle still applies.

2. While on that topic, is there support for whatever Microsoft's
replacement API for IP_TOS in NIO2?
Which one :-) AFAIK, they subsequently deprecated GQoS and brought out GQOS2. There were also a traffic control API for shaping but I think that has been deprecated aswell. Someone from the networking team would be better responding to this. It may be that policy based solution is better than introducing APIs for this.

-Alan.






Reply via email to