public class Multicast extends Object
Constructor and Description |
---|
Multicast() |
Modifier and Type | Method and Description |
---|---|
static int |
hops(long sock,
int ttl)
Set the Multicast Time to Live (ttl) for a multicast transmission.
|
static int |
join(long sock,
long join,
long iface,
long source)
Join a Multicast Group
|
static int |
leave(long sock,
long addr,
long iface,
long source)
Leave a Multicast Group.
|
static int |
loopback(long sock,
boolean opt)
Toggle IP Multicast Loopback
|
static int |
ointerface(long sock,
long iface)
Set the Interface to be used for outgoing Multicast Transmissions.
|
public static int join(long sock, long join, long iface, long source)
sock
- The socket to join a multicast groupjoin
- The address of the multicast group to joiniface
- Address of the interface to use. If NULL is passed, the
default multicast interface will be used. (OS Dependent)source
- Source Address to accept transmissions from (non-NULL
implies Source-Specific Multicast)public static int leave(long sock, long addr, long iface, long source)
sock
- The socket to leave a multicast groupaddr
- The address of the multicast group to leaveiface
- Address of the interface to use. If NULL is passed, the
default multicast interface will be used. (OS Dependent)source
- Source Address to accept transmissions from (non-NULL
implies Source-Specific Multicast)public static int hops(long sock, int ttl)
sock
- The socket to set the multicast ttlttl
- Time to live to Assign. 0-255, default=1
public static int loopback(long sock, boolean opt)
sock
- The socket to set multicast loopbackopt
- false=disable, true=enablepublic static int ointerface(long sock, long iface)
sock
- The socket to set the multicast interface oniface
- Address of the interface to use for MulticastCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.