natPlainSocketImpl.cc (bind): Bind to any/all network interfaces if host==NULL.
* java/net/natPlainSocketImpl.cc (bind): Bind to any/all network interfaces if host==NULL. (accept): Throw message with InterruptedIOException. (getOption): Cache localAddress. * java/net/natPlainDatagramSocketImpl.cc (bind): Don't need 'address' for DatagramSocket. (setTimeToLive): Fix compiler warnings. (getOption): Cache localAddress. * java/net/Socket.java (getLocalAddress): Don't need local InetAddress object. Add FIXME comment about calling checkConnect(). * java/net/ServerSocket.java (ServerSocket(int)): Initialize connection queue to 50 as per JDK 1.2 docs. (ServerSocket(int,int)): Listen on all network interfaces by default, per JDK 1.2 docs. * java/net/PlainDatagramSocketImpl.java: Don't need 'address'. Add localAddress caching. From-SVN: r27559
This commit is contained in:
parent
06c8baef3a
commit
1920afb3c6
7 changed files with 92 additions and 51 deletions
|
@ -129,10 +129,10 @@ public class Socket
|
|||
|
||||
public InetAddress getLocalAddress ()
|
||||
{
|
||||
InetAddress localAddress;
|
||||
// FIXME: see note in DatagramSocket.java about checkConnect() and security
|
||||
try
|
||||
{
|
||||
localAddress = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR);
|
||||
return (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR);
|
||||
}
|
||||
catch (SocketException x)
|
||||
{
|
||||
|
@ -140,7 +140,6 @@ public class Socket
|
|||
System.err.println(x);
|
||||
throw new java.lang.InternalError("Error in PlainSocketImpl.getOption");
|
||||
}
|
||||
return localAddress;
|
||||
}
|
||||
|
||||
public int getPort ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue