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

Diff of /classpath/java/net/Socket.java

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

revision 1.28 by mkoch, Wed Jun 11 17:52:01 2003 UTC revision 1.29 by mkoch, Wed Jun 18 09:44:40 2003 UTC
# Line 37  exception statement from your version. * Line 37  exception statement from your version. *
37    
38  package java.net;  package java.net;
39    
40  import java.io.*;  import java.io.InputStream;
41    import java.io.IOException;
42    import java.io.OutputStream;
43  import java.nio.channels.SocketChannel;  import java.nio.channels.SocketChannel;
44  import java.nio.channels.IllegalBlockingModeException;  import java.nio.channels.IllegalBlockingModeException;
45    
# Line 87  public class Socket Line 89  public class Socket
89    
90    private boolean closed = false;    private boolean closed = false;
91    
   // Constructors  
   
92    /**    /**
93     * Initializes a new instance of <code>Socket</code> object without     * Initializes a new instance of <code>Socket</code> object without
94     * connecting to a remote host.  This useful for subclasses of socket that     * connecting to a remote host.  This useful for subclasses of socket that
# Line 282  public class Socket Line 282  public class Socket
282    {    {
283      this();      this();
284    
285        if (raddr == null)
286          throw new NullPointerException ();
287        
288      if (impl == null)      if (impl == null)
289        throw new IOException("Cannot initialize Socket implementation");        throw new IOException("Cannot initialize Socket implementation");
290    
# Line 289  public class Socket Line 292  public class Socket
292      if (sm != null)      if (sm != null)
293        sm.checkConnect(raddr.getHostName(), rport);        sm.checkConnect(raddr.getHostName(), rport);
294    
295      // bind/connect socket      // bind socket
296      bind (new InetSocketAddress (laddr, lport));      SocketAddress bindaddr =
297          laddr == null ? null : new InetSocketAddress (laddr, lport);
298        bind (bindaddr);
299        
300        // connect socket
301      connect (new InetSocketAddress (raddr, rport));      connect (new InetSocketAddress (raddr, rport));
302    
303      // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port,      // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port,

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

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