/[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.10 by mkoch, Thu Nov 7 11:20:39 2002 UTC revision 1.11 by mkoch, Thu Nov 7 11:38:36 2002 UTC
# Line 73  public class MulticastSocket extends Dat Line 73  public class MulticastSocket extends Dat
73     * Create a MulticastSocket that this not bound to any address     * Create a MulticastSocket that this not bound to any address
74     *     *
75     * @exception IOException If an error occurs     * @exception IOException If an error occurs
76       * @exception SecurityException If a security manager exists and its
77       * checkListen method doesn't allow the operation
78     */     */
79    public MulticastSocket() throws IOException    public MulticastSocket() throws IOException
80    {    {
# Line 82  public class MulticastSocket extends Dat Line 84  public class MulticastSocket extends Dat
84    /**    /**
85     * Create a multicast socket bound to the specified port     * Create a multicast socket bound to the specified port
86     *     *
87     * @param The port to bind to     * @param port The port to bind to
88     *     *
89     * @exception IOException If an error occurs     * @exception IOException If an error occurs
90       * @exception SecurityException If a security manager exists and its
91       * checkListen method doesn't allow the operation
92     */     */
93    public MulticastSocket(int port) throws IOException    public MulticastSocket(int port) throws IOException
94    {    {
# Line 100  public class MulticastSocket extends Dat Line 104  public class MulticastSocket extends Dat
104     */     */
105    public InetAddress getInterface() throws SocketException    public InetAddress getInterface() throws SocketException
106    {    {
     // FIXME: Is it possible that an InetAddress wasn't returned from getOption?  
107      return (InetAddress) impl.getOption(SocketOptions.IP_MULTICAST_IF);      return (InetAddress) impl.getOption(SocketOptions.IP_MULTICAST_IF);
108    }    }
109    
# Line 113  public class MulticastSocket extends Dat Line 116  public class MulticastSocket extends Dat
116     *     *
117     * @exception IOException If an error occurs     * @exception IOException If an error occurs
118     *     *
119     * @deprecated Replaced by getTimeToLive() in Java 1.2     * @deprecated 1.2 Replaced by getTimeToLive()
120       *
121       * @see Multicastsocket:getTimeToLive
122     */     */
123    public byte getTTL() throws IOException    public byte getTTL() throws IOException
124    {    {
# Line 131  public class MulticastSocket extends Dat Line 136  public class MulticastSocket extends Dat
136     *     *
137     * @exception IOException If an error occurs     * @exception IOException If an error occurs
138     *     *
139     * @since Java 1.2     * @since 1.2
140     */     */
141    public int getTimeToLive() throws IOException    public int getTimeToLive() throws IOException
142    {    {
143      return impl.getTimeToLive();      return impl.getTimeToLive();
144    }    }
145    
146   /**    /**
147     * Sets the interface to use for multicast packets.     * Sets the interface to use for multicast packets.
148     *     *
149     * @param addr The new interface to use     * @param addr The new interface to use
150     *     *
151     * @exception SocketException If an error occurs     * @exception SocketException If an error occurs
152       *
153       * @since 1.4
154     */     */
155    public void setInterface(InetAddress inf) throws SocketException    public void setInterface(InetAddress inf) throws SocketException
156    {    {
# Line 158  public class MulticastSocket extends Dat Line 165  public class MulticastSocket extends Dat
165     *     *
166     * @exception IOException If an error occurs     * @exception IOException If an error occurs
167     *     *
168     * @deprecated Replaced by <code>setTimeToLive</code> in Java 1.2     * @deprecated 1.2 Replaced by <code>setTimeToLive</code>
169       *
170       * @see MulticastSocket:setTimeToLive
171     */     */
172    public void setTTL(byte ttl) throws IOException    public void setTTL(byte ttl) throws IOException
173    {    {
# Line 176  public class MulticastSocket extends Dat Line 185  public class MulticastSocket extends Dat
185     *     *
186     * @exception IOException If an error occurs     * @exception IOException If an error occurs
187     *     *
188     * @since Java 1.2     * @since 1.2
189     */     */
190    public void setTimeToLive(int ttl) throws IOException    public void setTimeToLive(int ttl) throws IOException
191    {    {
# Line 192  public class MulticastSocket extends Dat Line 201  public class MulticastSocket extends Dat
201     * @param addr The address of the group to join     * @param addr The address of the group to join
202     *     *
203     * @exception IOException If an error occurs     * @exception IOException If an error occurs
204       * @exception SecurityException If a security manager exists and its
205       * checkMulticast method doesn't allow the operation
206     */     */
207    public void joinGroup(InetAddress mcastaddr) throws IOException    public void joinGroup(InetAddress mcastaddr) throws IOException
208    {    {
# Line 211  public class MulticastSocket extends Dat Line 222  public class MulticastSocket extends Dat
222     * @param addr The address of the group to leave     * @param addr The address of the group to leave
223     *     *
224     * @exception IOException If an error occurs     * @exception IOException If an error occurs
225       * @exception SecurityException If a security manager exists and its
226       * checkMulticast method doesn't allow the operation
227     */     */
228    public void leaveGroup(InetAddress mcastaddr) throws IOException    public void leaveGroup(InetAddress mcastaddr) throws IOException
229    {    {
# Line 233  public class MulticastSocket extends Dat Line 246  public class MulticastSocket extends Dat
246     * @param ttl The TTL for this packet     * @param ttl The TTL for this packet
247     *     *
248     * @exception IOException If an error occurs     * @exception IOException If an error occurs
249       * @exception SecurityException If a security manager exists and its
250       * checkConnect or checkMulticast method doesn't allow the operation
251     */     */
252    public synchronized void send(DatagramPacket p, byte ttl) throws IOException    public synchronized void send(DatagramPacket p, byte ttl) throws IOException
253    {    {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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