public class MulticastGroup
extends java.lang.Object
Constructor and Description |
---|
MulticastGroup(java.lang.String group,
int port) |
MulticastGroup(java.lang.String group,
int port,
int bufferSize) |
MulticastGroup(java.lang.String group,
int port,
int bufferSize,
int timeout,
int ttl,
java.lang.String inf) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.net.InetAddress |
getInetAddress() |
java.net.InetAddress |
getInterface() |
java.net.NetworkInterface |
getNetworkInterface() |
int |
getPort() |
java.net.DatagramSocket |
getSocket() |
int |
getTimeout() |
boolean |
isConnected() |
static void |
main(java.lang.String[] args) |
java.lang.String |
receive() |
void |
receive(java.net.DatagramPacket p) |
void |
receive(XQueue xq)
get a used packet from XQ first and send the received packet to XQ
if the used packet is null, create a new packet for use
|
int |
reconnect() |
void |
send(byte[] buffer,
int offset,
int length) |
void |
send(java.net.DatagramPacket p) |
void |
send(java.lang.String text) |
void |
send(XQueue xq) |
void |
setSleepTime(int ms) |
void |
setTimeout(int timeout) |
void |
setTimeToLive(int tll) |
void |
setWaitTime(int ms) |
public MulticastGroup(java.lang.String group, int port)
public MulticastGroup(java.lang.String group, int port, int bufferSize)
public MulticastGroup(java.lang.String group, int port, int bufferSize, int timeout, int ttl, java.lang.String inf)
public int reconnect()
public void close()
public boolean isConnected()
public java.net.InetAddress getInetAddress()
public int getPort()
public int getTimeout()
public java.net.InetAddress getInterface() throws java.net.SocketException
java.net.SocketException
public java.net.NetworkInterface getNetworkInterface() throws java.net.SocketException
java.net.SocketException
public java.net.DatagramSocket getSocket()
public void setTimeout(int timeout)
public void setTimeToLive(int tll)
public void setSleepTime(int ms)
public void setWaitTime(int ms)
public void send(java.net.DatagramPacket p) throws java.io.IOException
java.io.IOException
public void send(byte[] buffer, int offset, int length) throws java.io.IOException
java.io.IOException
public void send(java.lang.String text) throws java.io.IOException
java.io.IOException
public void send(XQueue xq) throws java.io.IOException
java.io.IOException
public void receive(java.net.DatagramPacket p) throws java.io.IOException
java.io.IOException
public void receive(XQueue xq) throws java.io.IOException
java.io.IOException
public java.lang.String receive() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)