super(getInetAddress(client, hostname), port);
}
private static InetAddress getInetAddress(Client client, String hostname)
{
SocketModule socket = (SocketModule)client.getModule("socket");
try
{
return InetAddress.getByName(socket.getHostByName(hostname));
}
catch (java.net.UnknownHostException e)
{
// This shouldn't occur: passing an IP into getByName will just
// validate the format of the IP.