org.apache.tomcat.jni

Class Multicast

public class Multicast extends Object

Multicast

Version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $

Author: Mladen Turk

Method Summary
static inthops(long sock, int ttl)
Set the Multicast Time to Live (ttl) for a multicast transmission.
static intjoin(long sock, long join, long iface, long source)
Join a Multicast Group
static intleave(long sock, long addr, long iface, long source)
Leave a Multicast Group.
static intloopback(long sock, boolean opt)
Toggle IP Multicast Loopback
static intointerface(long sock, long iface)
Set the Interface to be used for outgoing Multicast Transmissions.

Method Detail

hops

public static int hops(long sock, int ttl)
Set the Multicast Time to Live (ttl) for a multicast transmission.

Parameters: sock The socket to set the multicast ttl ttl Time to live to Assign. 0-255, default=1
Remark : If the TTL is 0, packets will only be seen by sockets on the local machine, and only when multicast loopback is enabled.

join

public static int join(long sock, long join, long iface, long source)
Join a Multicast Group

Parameters: sock The socket to join a multicast group join The address of the multicast group to join iface 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)

leave

public static int leave(long sock, long addr, long iface, long source)
Leave a Multicast Group. All arguments must be the same as apr_mcast_join.

Parameters: sock The socket to leave a multicast group addr The address of the multicast group to leave iface 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)

loopback

public static int loopback(long sock, boolean opt)
Toggle IP Multicast Loopback

Parameters: sock The socket to set multicast loopback opt false=disable, true=enable

ointerface

public static int ointerface(long sock, long iface)
Set the Interface to be used for outgoing Multicast Transmissions.

Parameters: sock The socket to set the multicast interface on iface Address of the interface to use for Multicast

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.