setTrafficClass on server socket; IP_TOS replacement on Windows

View: New views
2 Messages — Rating Filter:   Alert me  

setTrafficClass on server socket; IP_TOS replacement on Windows

by Esmond Pitt FACS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alan

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.

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?

EJP


Re: setTrafficClass on server socket; IP_TOS replacement on Windows

by alan.bateman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Esmond Pitt FACS wrote:

> Alan
>
> 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.
>
> 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?
>
> EJP
>  
Esmond - you can re-send this to net-dev?

-Alan.