/[classpath]/classpath/java/net/ServerSocket.java
ViewVC logotype

Diff of /classpath/java/net/ServerSocket.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by mkoch, Thu Nov 7 12:05:02 2002 UTC revision 1.14 by mkoch, Tue Nov 12 07:23:38 2002 UTC
# Line 184  public class ServerSocket Line 184  public class ServerSocket
184    public void bind (SocketAddress endpoint)    public void bind (SocketAddress endpoint)
185      throws IOException      throws IOException
186    {    {
187        if (impl == null)
188          throw new IOException ("Cannot initialize Socket implementation");
189    
190        if (! (endpoint instanceof InetSocketAddress))
191          throw new IllegalArgumentException ("Address type not supported");
192    
193        InetSocketAddress tmp = (InetSocketAddress) endpoint;
194        
195        SecurityManager s = System.getSecurityManager ();
196        if (s != null)
197          s.checkListen (tmp.getPort ());
198    
199        impl.bind (tmp.getAddress (), tmp.getPort ());
200    }    }
201    
202    /**    /**
# Line 201  public class ServerSocket Line 214  public class ServerSocket
214     */     */
215    public void bind (SocketAddress endpoint, int backlog) throws IOException    public void bind (SocketAddress endpoint, int backlog) throws IOException
216    {    {
217        if (impl == null)
218          throw new IOException ("Cannot initialize Socket implementation");
219    
220        if (! (endpoint instanceof InetSocketAddress))
221          throw new IllegalArgumentException ("Address type not supported");
222    
223        InetSocketAddress tmp = (InetSocketAddress) endpoint;
224        
225        SecurityManager s = System.getSecurityManager ();
226        if (s != null)
227          s.checkListen (tmp.getPort ());
228    
229        impl.bind (tmp.getAddress (), tmp.getPort ());
230        impl.listen(backlog);
231    }    }
232        
233    /**    /**

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26