-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
rc1
-
sparc
-
solaris_8
-
Verified
DatagramSocket.getTrafficClass() throwing following SocketException on Sol sparc 8 and Sol IA8 with merlin build 82. Its working fine with build 81. Even with build 82 it works fine on Win 98 and Sol 2.6 .
java.net.SocketException: error getting socket option: Option not supported by protocol
at java.net.PlainDatagramSocketImpl.socketGetOption(Native Method)
at java.net.PlainDatagramSocketImpl.getOption(PlainDatagramSocketImpl.java:279)
at java.net.DatagramSocket.getTrafficClass(DatagramSocket.java:1021)
at UdpServer.main(UdpServer.java:15)
You can execute below snippet to get this..
public class UdpServer {
public static void main(String[] args) {
int port = 2350;
try{
//SocketAddress sa = new InetSocketAddress(port);
//DatagramSocket ds = new DatagramSocket(sa);
DatagramSocket ds = new DatagramSocket();
//ds.setTrafficClass(1);
System.out.println("get traffic class " + ds.getTrafficClass());
}catch(Exception exp) {
exp.printStackTrace();
}
}
}
java.net.SocketException: error getting socket option: Option not supported by protocol
at java.net.PlainDatagramSocketImpl.socketGetOption(Native Method)
at java.net.PlainDatagramSocketImpl.getOption(PlainDatagramSocketImpl.java:279)
at java.net.DatagramSocket.getTrafficClass(DatagramSocket.java:1021)
at UdpServer.main(UdpServer.java:15)
You can execute below snippet to get this..
public class UdpServer {
public static void main(String[] args) {
int port = 2350;
try{
//SocketAddress sa = new InetSocketAddress(port);
//DatagramSocket ds = new DatagramSocket(sa);
DatagramSocket ds = new DatagramSocket();
//ds.setTrafficClass(1);
System.out.println("get traffic class " + ds.getTrafficClass());
}catch(Exception exp) {
exp.printStackTrace();
}
}
}
- relates to
-
JDK-4521785 Socket.getTrafficClass() is throwing SocketException under Win 2000
-
- Closed
-