aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net/ServerSocket.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/net/ServerSocket.java')
-rw-r--r--libjava/java/net/ServerSocket.java18
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