pranahata
pranahata

Reputation: 540

Java 13+ SocketOption IP_TOS (setTrafficClass)

Apparently Socket implementations were re-written as part of https://openjdk.java.net/jeps/353 and now it uses java.base/sun.nio.ch.NioSocketImpl

Been trying to set the traficClass or in other words the IP_TOS field of the ip header without success.

Have tried with socket.setTrafficClass and socket.setSocketOption(StandardSocketOption.IPTOS) and neither i see the values in wireshark nor subsequent calls to getTrafficClass or getSocketOption returning anything other than 0

Problem happening in Windows 10 but i at least on centos7 getTrafficClass does return the value previously set

Upvotes: 1

Views: 508

Answers (0)

Related Questions