|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.anotheria.net.udp.client.UDPPacketSender
public class UDPPacketSender
Utility class which sends packets over udp.
| Constructor Summary | |
|---|---|
UDPPacketSender(int aSourcePort)
Creates a new UDPPacketSender with the given port as sender port. |
|
UDPPacketSender(int aMinPort,
int aMaxPort)
Creates a new UDPPacketSender with a given port range for the outgoing port. |
|
UDPPacketSender(int aMinPort,
int aMaxPort,
String aDefaultHost,
int aDefaultPort)
Creates a new UDPPacketSender with outgoing port range, a default target host and port. |
|
UDPPacketSender(int aSourcePort,
String aDefaultHost,
int aDefaultPort)
Creates a new UDPPacketSender with a given outgoing port, default target host and port. |
|
| Method Summary | |
|---|---|
void |
send(byte[] data)
Sends some data to the default host and port. |
void |
sendTo(byte[] data,
String host,
int port)
Sends some data to the given host and port. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UDPPacketSender(int aSourcePort)
aSourcePort - the port to use as outgoing port.
public UDPPacketSender(int aMinPort,
int aMaxPort)
aMinPort - the min port in the outgoing port rangeaMaxPort - the max port in the outgoing port range
public UDPPacketSender(int aSourcePort,
String aDefaultHost,
int aDefaultPort)
aSourcePort - the port to use as outgoing port.aDefaultHost - the default target host.aDefaultPort - the default target port.
public UDPPacketSender(int aMinPort,
int aMaxPort,
String aDefaultHost,
int aDefaultPort)
aMinPort - the min port in the outgoing port rangeaMaxPort - the max port in the outgoing port rangeaDefaultHost - the default target host.aDefaultPort - the default target port.| Method Detail |
|---|
public void send(byte[] data)
data - the data to send.
public void sendTo(byte[] data,
String host,
int port)
data - the data to send.host - the host to send the data to.port - the port to send the data to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||