I am trying to mark DSCP values using setTrafficClass. I have server and client set up on two different machines and I am able to print value of DSCP but I can not see it in
Last time I worked with DSCP values in Java one had to set the java.net.preferIPv4Stack
system property to true
due to a bug in the JVM. Othwerwise DSCP values would not be set on the underlying socket despite appearing to work in the java.net.Socket API.
Also you may have to call setTrafficClass
before connecting the socket, it may not work after connection on some platforms.
java -Djava.net.preferIPv4Stack=true ...