diff options
Diffstat (limited to 'java/src/IceInternal/Network.java')
-rw-r--r-- | java/src/IceInternal/Network.java | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/java/src/IceInternal/Network.java b/java/src/IceInternal/Network.java index 0fdb0ae281d..9ddaa1c87d9 100644 --- a/java/src/IceInternal/Network.java +++ b/java/src/IceInternal/Network.java @@ -17,8 +17,7 @@ public final class Network { try { - java.nio.channels.SocketChannel fd = - java.nio.channels.SocketChannel.open(); + java.nio.channels.SocketChannel fd = java.nio.channels.SocketChannel.open(); java.net.Socket socket = fd.socket(); socket.setTcpNoDelay(true); socket.setKeepAlive(true); @@ -342,44 +341,6 @@ public final class Network } } - public static java.net.InetSocketAddress - getLocalAddress(int port) - { - try - { - java.net.InetAddress addr = java.net.InetAddress.getLocalHost(); - return new java.net.InetSocketAddress(addr, port); - } - catch (java.net.UnknownHostException ex) - { - throw new Ice.DNSException(); - } - } - - public static String - getLocalHost(boolean numeric) - { - String host; - - try - { - if (!numeric) - { - host = java.net.InetAddress.getLocalHost().getHostName(); - } - else - { - host = java.net.InetAddress.getLocalHost().getHostAddress(); - } - } - catch(java.net.UnknownHostException ex) - { - throw new Ice.DNSException(); - } - - return host; - } - public static class SocketPair { public java.nio.channels.spi.AbstractSelectableChannel source; |