summaryrefslogtreecommitdiff
path: root/java/net/ServerSocket.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2002-11-07 12:05:01 +0000
committerMichael Koch <konqueror@gmx.de>2002-11-07 12:05:01 +0000
commitedef456795851306219756709a1837ee5bff93f4 (patch)
treeb20bc5ac746d59b488b92ffb59534fb3a77f129f /java/net/ServerSocket.java
parent9e364a2b3e7306b0620c2e0df58a17a77fec6e3c (diff)
downloadclasspath-edef456795851306219756709a1837ee5bff93f4.tar.gz
2002-11-07 Michael Koch <konqueror@gmx.de>
* java/net/ServerSocket.java, java/net/Socket.java, java/net/SocketImpl.java: More merges with libgcj.
Diffstat (limited to 'java/net/ServerSocket.java')
-rw-r--r--java/net/ServerSocket.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/java/net/ServerSocket.java b/java/net/ServerSocket.java
index bac450d4e..116240866 100644
--- a/java/net/ServerSocket.java
+++ b/java/net/ServerSocket.java
@@ -170,6 +170,40 @@ public class ServerSocket
}
/**
+ * Binds the server socket to a specified socket address
+ *
+ * @param endpoint The socket address to bind to
+ *
+ * @exception IOException If an error occurs
+ * @exception IllegalArgumentException If address type is not supported
+ * @exception SecurityException If a security manager exists and its
+ * checkListen method doesn't allow the operation
+ *
+ * @since 1.4
+ */
+ public void bind (SocketAddress endpoint)
+ throws IOException
+ {
+ }
+
+ /**
+ * Binds the server socket to a specified socket address
+ *
+ * @param endpoint The socket address to bind to
+ * @param backlog The length of the pending connection queue
+ *
+ * @exception IOException If an error occurs
+ * @exception IllegalArgumentException If address type is not supported
+ * @exception SecurityException If a security manager exists and its
+ * checkListen method doesn't allow the operation
+ *
+ * @since 1.4
+ */
+ public void bind (SocketAddress endpoint, int backlog) throws IOException
+ {
+ }
+
+ /**
* This method returns the local address to which this socket is bound
*
* @return The socket's local address
@@ -226,6 +260,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);