InetAddress.java (ANY_IF): moved from ServerSocket.
* java/net/InetAddress.java (ANY_IF): moved from ServerSocket.
* java/net/DatagramSocket.java (DatagramSocket): use ANY_IF from
InetAddress.
* java/net/MulticastSocket.java (MulticastSocket): Likewise.
* java/net/Socket.java: Merge with Classpath.
* java/net/ServerSocket.java: Likewise.
From-SVN: r48797
This commit is contained in:
committed by
Mark Wielaard
parent
e37af218ee
commit
9566a90c6b
@@ -240,6 +240,10 @@ public final class InetAddress implements java.io.Serializable
|
||||
return lookup(host, null, true);
|
||||
}
|
||||
|
||||
static final byte[] zeros = {0,0,0,0};
|
||||
/* dummy InetAddress, used to bind socket to any (all) network interfaces */
|
||||
static final InetAddress ANY_IF = new InetAddress(zeros, null);
|
||||
|
||||
private static final byte[] localhostAddress = { 127, 0, 0, 1 };
|
||||
|
||||
private static native String getLocalHostname ();
|
||||
|
||||
Reference in New Issue
Block a user