diff options
author | warrenl <warrenl@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-28 19:29:53 +0000 |
---|---|---|
committer | warrenl <warrenl@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-28 19:29:53 +0000 |
commit | 1f0737d620faad32e95b2a2538fc2741ddfdb23b (patch) | |
tree | 2be352b9baec3fecd8a60eda2e771c4cb2819327 /libjava/java/net/Socket.java | |
parent | 2d3ec8b22cb3e578896b9cc5819da87180d1ad0f (diff) | |
download | gcc-1f0737d620faad32e95b2a2538fc2741ddfdb23b.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27230 138bc75d-0d04-0410-961f-82ee72b054a4
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 e4ef2d7eb88..db46db18e45 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); } |