Socket.setTrafficClass() on Mac OS X
Hi all,
I have TCP code which works fine on Linux, but fails on Mac OS X (java 1.5.0_07-87). In particular, the setTrafficClass below (the hex number is IPTOS_THROUGHPUT) throws a IOException with the following error:
upload: Invalid argument
[java] java.net.SocketException: Invalid argument
[java]at java.net.PlainSocketImpl.socketSetOption(Native Method)
[java]at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:264)
[java]at java.net.Socket.setTrafficClass(Socket.java:1211)
byte[] address = isa.getAddress().getAddress();
if (address.length == IPv4_INADDRSZ){// IPv4
s.setTrafficClass(0x08);
}
Any idea?
Thanks,
Michele

