diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-03 14:30:48 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-03 14:30:48 +0000 |
commit | 9d6115d3e947a0804a3df7e4e97b7ea833ca8f0d (patch) | |
tree | 083ec10ee6e31b213f92a088bb5e803da3668318 /libjava/java/net/ServerSocket.java | |
parent | 11ebbb259fc2d9c6dd767ddaa7e241cbcb6d994c (diff) | |
download | gcc-9d6115d3e947a0804a3df7e4e97b7ea833ca8f0d.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57776 138bc75d-0d04-0410-961f-82ee72b054a4
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 36f93e8b64c..b7c69913a05 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 |