diff options
author | Warren Levy <warrenl@cygnus.com> | 1999-05-28 19:29:53 +0000 |
---|---|---|
committer | Warren Levy <warrenl@gcc.gnu.org> | 1999-05-28 19:29:53 +0000 |
commit | 07515641a55ffacad7a289e32702831f54630d07 (patch) | |
tree | 2be352b9baec3fecd8a60eda2e771c4cb2819327 /libjava/java/net/Socket.java | |
parent | 930248932e3864264cdfe7d40b00a0544f3d4de9 (diff) | |
download | gcc-07515641a55ffacad7a289e32702831f54630d07.zip gcc-07515641a55ffacad7a289e32702831f54630d07.tar.gz gcc-07515641a55ffacad7a289e32702831f54630d07.tar.bz2 |
DatagramSocket.java (laddr): Removed.
* java/net/DatagramSocket.java (laddr): Removed.
(DatagramSocket): Removed attempts to get or set laddr if null.
(getLocalAddress): Reimplemented per spec.
* java/net/MulticastSocket.java (setTimeToLive): Throw exception
when ttl is 0.
(joinGroup): Throw NullPointerException if any argument is null.
(leaveGroup): ditto.
* java/net/PlainDatagramSocketImpl.java: Updated comments.
* java/net/PlainSocketImpl.java (timeout): Added.
(getInputStream): Added FIXME comment on how to support timeouts
for TCP.
* java/net/ServerSocket.java (ServerSocket): Added FIXME comment.
* java/net/Socket.java: Added FIXME comments to identify
conflicting specs between the JCL and JDK 1.2 documents.
* java/net/natPlainDatagramSocketImpl.cc (bind): Use INADDR_ANY
if host is null. Get localport value resolved by kernel if bind
lport is 0.
(receive): Implemented support for timeouts in UDP.
(setOption): Implemented based on natPlainSocketImpl version.
(getOption): ditto.
* java/net/natPlainSocketImpl.cc (bind): Get localport value
resolved by kernel if bind lport is 0.
(connect): Get localport value resolved by kernel if bind wasn't
done to set localport.
(accept): Implemented support for timeouts for ServerSocket.
(setOption): Save value for SO_TIMEOUT.
(getOption): Return timeout for SO_TIMEOUT.
From-SVN: r27230
Diffstat (limited to 'libjava/java/net/Socket.java')
-rw-r--r-- | libjava/java/net/Socket.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libjava/java/net/Socket.java b/libjava/java/net/Socket.java index e4ef2d7..db46db1 100644 --- a/libjava/java/net/Socket.java +++ b/libjava/java/net/Socket.java @@ -42,6 +42,9 @@ public class Socket if (s != null) s.checkConnect(host, port); impl.create(true); + // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port, + // i.e. '0' and if localAddr is unspecified, use getLocalAddress() as + // that default. JDK 1.2 doc infers not to do a bind. impl.connect(host, port); } @@ -53,6 +56,9 @@ public class Socket if (s != null) s.checkConnect(address.getHostName(), port); impl.create(true); + // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port, + // i.e. '0' and if localAddr is unspecified, use getLocalAddress() as + // that default. JDK 1.2 doc infers not to do a bind. impl.connect(address, port); } @@ -64,6 +70,7 @@ public class Socket if (s != null) s.checkConnect(host, port); impl.create(true); + // FIXME: JCL p. 1587 says if localAddr is null, use getLocalAddress(). impl.bind(localAddr, localPort); impl.connect(host, port); } @@ -76,6 +83,7 @@ public class Socket if (s != null) s.checkConnect(address.getHostName(), port); impl.create(true); + // FIXME: JCL p. 1587 says if localAddr is null, use getLocalAddress(). impl.bind(localAddr, localPort); impl.connect(address, port); } @@ -91,6 +99,9 @@ public class Socket SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(host, port); + // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port, + // i.e. '0' and if localAddr is unspecified, use getLocalAddress() as + // that default. JDK 1.2 doc infers not to do a bind. impl.connect(host, port); } @@ -105,6 +116,9 @@ public class Socket SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(host.getHostName(), port); + // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port, + // i.e. '0' and if localAddr is unspecified, use getLocalAddress() as + // that default. JDK 1.2 doc infers not to do a bind. impl.connect(host, port); } |