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

Diff of /classpath/java/net/MulticastSocket.java

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

revision 1.19 by mkoch, Sat Jun 7 21:19:02 2003 UTC revision 1.20 by mkoch, Tue Dec 2 10:04:08 2003 UTC
# Line 67  import java.util.Enumeration; Line 67  import java.util.Enumeration;
67   */   */
68  public class MulticastSocket extends DatagramSocket  public class MulticastSocket extends DatagramSocket
69  {  {
   // FIXME: the local addr bound to the multicast socket can be reused;  
   // unlike unicast sockets.  It binds to any available network interface.  
   // See p.1159 JCL book.  
   
70    /**    /**
71     * Create a MulticastSocket that this not bound to any address     * Create a MulticastSocket that this not bound to any address
72     *     *
# Line 80  public class MulticastSocket extends Dat Line 76  public class MulticastSocket extends Dat
76     */     */
77    public MulticastSocket() throws IOException    public MulticastSocket() throws IOException
78    {    {
79      super(0, null);      this(new InetSocketAddress(0));
     setReuseAddress (true);  
80    }    }
81    
82    /**    /**
# Line 95  public class MulticastSocket extends Dat Line 90  public class MulticastSocket extends Dat
90     */     */
91    public MulticastSocket(int port) throws IOException    public MulticastSocket(int port) throws IOException
92    {    {
93      super(port, null);      this(new InetSocketAddress(port));
     setReuseAddress (true);  
94    }    }
95    
96    /**    /**
# Line 112  public class MulticastSocket extends Dat Line 106  public class MulticastSocket extends Dat
106     */     */
107    public MulticastSocket(SocketAddress address) throws IOException    public MulticastSocket(SocketAddress address) throws IOException
108    {    {
109      super(address);      super((SocketAddress) null);
110      setReuseAddress (true);      setReuseAddress(true);
111        if (address != null)
112          bind(address);
113    }    }
114        
115    /**    /**

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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