mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8237896: MulticastSocket should link to DatagramChannel as an alternative for multicasting
MulticastSocket API documentation now includes some links to DatagramChannel. Reviewed-by: alanb
This commit is contained in:
parent
9d5d2a241a
commit
e0901fb627
1 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,8 @@
|
||||||
package java.net;
|
package java.net;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.channels.DatagramChannel;
|
||||||
|
import java.nio.channels.MulticastChannel;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -121,6 +123,13 @@ import java.util.Set;
|
||||||
* </blockquote>
|
* </blockquote>
|
||||||
* Additional (implementation specific) options may also be supported.
|
* Additional (implementation specific) options may also be supported.
|
||||||
*
|
*
|
||||||
|
* @apiNote {@link DatagramChannel} implements the {@link MulticastChannel} interface
|
||||||
|
* and provides an alternative API for sending and receiving multicast datagrams.
|
||||||
|
* The {@link MulticastChannel} API supports both {@linkplain
|
||||||
|
* MulticastChannel#join(InetAddress, NetworkInterface) any-source} and
|
||||||
|
* {@linkplain MulticastChannel#join(InetAddress, NetworkInterface, InetAddress)
|
||||||
|
* source-specific} multicast.
|
||||||
|
*
|
||||||
* @author Pavani Diwanji
|
* @author Pavani Diwanji
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@ -438,6 +447,7 @@ public class MulticastSocket extends DatagramSocket {
|
||||||
* @throws IllegalArgumentException if mcastaddr is {@code null} or is a
|
* @throws IllegalArgumentException if mcastaddr is {@code null} or is a
|
||||||
* SocketAddress subclass not supported by this socket
|
* SocketAddress subclass not supported by this socket
|
||||||
* @see SecurityManager#checkMulticast(InetAddress)
|
* @see SecurityManager#checkMulticast(InetAddress)
|
||||||
|
* @see DatagramChannel#join(InetAddress, NetworkInterface)
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)
|
public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue