R
robby
I am using a generic tcp connect on hpux 11i with an ipv6 address.
I am able to make the connection with an ipv4 address.
host_addr = InetAddress.getByName(host);
host_sock_addr = new InetSocketAddress(host_addr, port);
try
{
socket = new Socket();
}
catch (SocketException e)
{
//error
}
try
{
socket.connect(host_sock_addr, 1000);
}
catch (SocketException e)
{
System.out.println(" err "+e.toString() + " "
+Err.SOCKET_CONNECT_ERR );
return retval;
}
output:
java.net.SocketException: Protocol family unavailable 56
I am able to make the connection with an ipv4 address.
host_addr = InetAddress.getByName(host);
host_sock_addr = new InetSocketAddress(host_addr, port);
try
{
socket = new Socket();
}
catch (SocketException e)
{
//error
}
try
{
socket.connect(host_sock_addr, 1000);
}
catch (SocketException e)
{
System.out.println(" err "+e.toString() + " "
+Err.SOCKET_CONNECT_ERR );
return retval;
}
output:
java.net.SocketException: Protocol family unavailable 56