com.cycling74.net
Class MultiSender

java.lang.Object
  extended by com.cycling74.net.MultiSender

public class MultiSender
extends java.lang.Object

Send to a multicast group. created on 17-May-2004


Constructor Summary
MultiSender()
          Create a new MultiSender.
MultiSender(java.lang.String groupName, int port)
          Create a new MultiSender with specified group and port.
MultiSender(java.lang.String groupName, int port, byte timeToLive)
          Create a new MultiSender with specified group, port, and time to live.
MultiSender(java.lang.String groupName, int port, java.lang.String debugString, byte timeToLive)
          Create a new MultiSender with specified group name, port, debug string, and time to live.
 
Method Summary
 java.lang.String getGroup()
          Get the group.
 int getPort()
          Get the port.
 byte getTimeToLive()
          Gets time to live.
 void send(Atom[] a)
          Send an Atom array.
 void send(float f)
          Send a float.
 void send(int i)
          Send an integer.
 void send(java.lang.String msg, Atom[] a)
          Send a message.
 void setDebugString(java.lang.String s)
          Sets the debug string.
 void setGroup(java.lang.String s)
          Set the group.
 void setPort(int p)
          Set the port.
 void setTimeToLive(int i)
          Sets time to live.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiSender

public MultiSender(java.lang.String groupName,
                   int port,
                   java.lang.String debugString,
                   byte timeToLive)
Create a new MultiSender with specified group name, port, debug string, and time to live.

Parameters:
groupName - group to send to
port - port to send on
debugString - part of the output to the Max window in the event of a networking error
timeToLive - number of hops the transmission will stay alive

MultiSender

public MultiSender(java.lang.String groupName,
                   int port,
                   byte timeToLive)
Create a new MultiSender with specified group, port, and time to live.

Parameters:
groupName - group to send to
port - port to send on
timeToLive - number of hops the transmission will stay alive

MultiSender

public MultiSender(java.lang.String groupName,
                   int port)
Create a new MultiSender with specified group and port. Time to live is set to a default of 1.

Parameters:
groupName - group to send to
port - port to send on

MultiSender

public MultiSender()
Create a new MultiSender. group and port must be specified with setGroup and setPort before anything can happen.

Method Detail

setPort

public void setPort(int p)
Set the port.

Parameters:
p - port to send over.

getPort

public int getPort()
Get the port.

Returns:
the port data is being sent over.

setGroup

public void setGroup(java.lang.String s)
Set the group.

Parameters:
s - the group to send to

getGroup

public java.lang.String getGroup()
Get the group.

Returns:
the group data is being sent to

setTimeToLive

public void setTimeToLive(int i)
Sets time to live.

Parameters:
i - the transmission will remain alive for this number of hops.

getTimeToLive

public byte getTimeToLive()
Gets time to live.

Returns:
the number of hops that a transmission will stay alive.

setDebugString

public void setDebugString(java.lang.String s)
Sets the debug string.

Parameters:
s - the debug string

send

public void send(int i)
Send an integer.

Parameters:
i - the int to send

send

public void send(float f)
Send a float.

Parameters:
f - the float to send

send

public void send(Atom[] a)
Send an Atom array.

Parameters:
a - the Atom array to send.

send

public void send(java.lang.String msg,
                 Atom[] a)
Send a message.

Parameters:
msg - the message to send
a - the arguments to send with the message