netP5
Class Multicast

java.lang.Object
  extended by netP5.AbstractMulticast
      extended by netP5.Multicast
All Implemented Interfaces:
Runnable, UdpPacketListener

public class Multicast
extends AbstractMulticast
implements UdpPacketListener

Multicast is a method of forwarding IP datagrams to a group of interested receivers. UDP is used as the transport portocol.


Constructor Summary
Multicast(Object theObject, String theMulticastAddress, int thePort)
           
Multicast(Object theObject, String theMulticastAddress, int thePort, int theBufferSize)
          create a new instance of Multicast.
Multicast(UdpPacketListener theDatagramListener, String theMulticastAddress, int thePort)
           
Multicast(UdpPacketListener theDatagramListener, String theMulticastAddress, int thePort, int theBufferSize)
           
 
Method Summary
 void addListener(NetListener theListener)
           
 NetListener getListener(int theIndex)
           
 Vector getListeners()
           
 void process(DatagramPacket thePacket, int thePort)
           
 void removeListener(NetListener theListener)
           
 
Methods inherited from class netP5.AbstractMulticast
close, dispose, loopback, run, send, send, setDatagramSize, setLoopback, setTimeToLive, socket, start, timeToLive
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Multicast

public Multicast(Object theObject,
                 String theMulticastAddress,
                 int thePort,
                 int theBufferSize)
create a new instance of Multicast. the buffersize of the datagrams is set to 1536 by default.

Parameters:
theObject - Object
theMulticastAddress - String
thePort - int
theBufferSize - int

Multicast

public Multicast(Object theObject,
                 String theMulticastAddress,
                 int thePort)

Multicast

public Multicast(UdpPacketListener theDatagramListener,
                 String theMulticastAddress,
                 int thePort,
                 int theBufferSize)

Multicast

public Multicast(UdpPacketListener theDatagramListener,
                 String theMulticastAddress,
                 int thePort)
Method Detail

process

public void process(DatagramPacket thePacket,
                    int thePort)
Specified by:
process in interface UdpPacketListener
Parameters:
thePacket - DatagramPacket
thePort - int

addListener

public void addListener(NetListener theListener)

removeListener

public void removeListener(NetListener theListener)

getListener

public NetListener getListener(int theIndex)

getListeners

public Vector getListeners()


processing library oscP5 by Andreas Schlegel. (c) 2004-2012