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.java22
1 files changed, 4 insertions, 18 deletions
diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java
index b7c69913a05..62917b6a8a5 100644
--- a/libjava/java/net/ServerSocket.java
+++ b/libjava/java/net/ServerSocket.java
@@ -60,16 +60,11 @@ import java.nio.channels.ServerSocketChannel;
*/
public class ServerSocket
{
-
- // Class Variables
-
/**
* This is the user defined SocketImplFactory, if one is supplied
*/
private static SocketImplFactory factory;
- // Instance Variables
-
/**
* This is the SocketImp object to which most instance methods in this
* class are redirected
@@ -95,6 +90,8 @@ public class ServerSocket
impl = factory.createSocketImpl();
else
impl = new PlainSocketImpl();
+
+ impl.create(true);
}
/**
@@ -154,6 +151,7 @@ public class ServerSocket
throws IOException
{
this();
+
if (impl == null)
throw new IOException("Cannot initialize Socket implementation");
@@ -184,19 +182,7 @@ public class ServerSocket
public void bind (SocketAddress endpoint)
throws IOException
{
- if (impl == null)
- throw new IOException ("Cannot initialize Socket implementation");
-
- if (! (endpoint instanceof InetSocketAddress))
- throw new IllegalArgumentException ("Address type not supported");
-
- InetSocketAddress tmp = (InetSocketAddress) endpoint;
-
- SecurityManager s = System.getSecurityManager ();
- if (s != null)
- s.checkListen (tmp.getPort ());
-
- impl.bind (tmp.getAddress (), tmp.getPort ());
+ bind (endpoint, 50);
}
/**