diff options
author | Michael Koch <konqueror@gmx.de> | 2002-10-03 14:30:48 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2002-10-03 14:30:48 +0000 |
commit | a8e8f5c359b655106f4d59afc99315d0bb420040 (patch) | |
tree | 083ec10ee6e31b213f92a088bb5e803da3668318 /libjava/java/net/ServerSocket.java | |
parent | 4c9c9a3da5efd5ae740201250428f7a48a263ac7 (diff) | |
download | gcc-a8e8f5c359b655106f4d59afc99315d0bb420040.zip gcc-a8e8f5c359b655106f4d59afc99315d0bb420040.tar.gz gcc-a8e8f5c359b655106f4d59afc99315d0bb420040.tar.bz2 |
2002-10-03 Michael Koch <konqueror@gmx.de>
* java/net/DatagramPacket.java
(setLength): Fixed typo and be HTML-aware.
* java/net/InetSocketAddress.java
(InetSocketAddress): Correct initialization of hostname, fixed typo.
(equals): Added comment about equality of InetSocketAddress objects.
* java/net/ServerSocket.java
(accept): Added checks.
(isClosed): New stubbed method.
* java/net/SocketOptions.java: Reindention.
* java/net/SocketPermission
(SocketPermission): Documentation fixed.
From-SVN: r57776
Diffstat (limited to 'libjava/java/net/ServerSocket.java')
-rw-r--r-- | libjava/java/net/ServerSocket.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java index 36f93e8..b7c6991 100644 --- a/libjava/java/net/ServerSocket.java +++ b/libjava/java/net/ServerSocket.java @@ -287,6 +287,13 @@ public class ServerSocket */ public Socket accept () throws IOException { + if (impl == null) + throw new IOException ("Cannot initialize Socket implementation"); + + SecurityManager sm = System.getSecurityManager (); + if (sm != null) + sm.checkListen (impl.getLocalPort ()); + Socket s = new Socket(); implAccept (s); @@ -359,6 +366,17 @@ public class ServerSocket } /** + * Returns true if the socket is closed, otherwise false + * + * @since 1.4 + */ + public boolean isClosed() + { + // FIXME: implement this + return false; + } + + /** * Sets the value of SO_TIMEOUT. A value of 0 implies that SO_TIMEOUT is * disabled (ie, operations never time out). This is the number of * milliseconds a socket operation can block before an |