mdw.sandStorm.lib.aSocket
Class AUdpPacket
java.lang.Object
|
+--mdw.sandStorm.core.BufferElement
|
+--mdw.sandStorm.lib.aSocket.AUdpPacket
- All Implemented Interfaces:
- QueueElementIF
- public class AUdpPacket
- extends BufferElement
An AUdpPacket is an extension to BufferElement that supports
specifying the destination address and port for a given packet.
- Author:
- Matt Welsh
Constructor Summary |
AUdpPacket(byte[] data)
Create an AUdpPacket with the given data, an offset of 0, and a
size of data.length. |
AUdpPacket(byte[] data,
int offset,
int size)
Create an AUdpPacket with the given data, offset, and size. |
AUdpPacket(byte[] data,
int offset,
int size,
SinkIF compQ)
Create an AUdpPacket with the given data, offset, size, and
completion queue. |
AUdpPacket(byte[] data,
int offset,
int size,
SinkIF compQ,
java.net.InetAddress address,
int port)
Create an AUdpPacket with the given data, offset, size,
completion queue, destination address, and port. |
AUdpPacket(byte[] data,
SinkIF compQ)
Create an AUdpPacket with the given data, an offset of 0, and a
size of data.length, with the given completion queue. |
AUdpPacket(int size)
Create an AUdpPacket with a new data array of the given size. |
Method Summary |
java.net.InetAddress |
getAddress()
Return the destination address. |
int |
getPort()
Return the destination port. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
address
public java.net.InetAddress address
port
public int port
AUdpPacket
public AUdpPacket(byte[] data)
- Create an AUdpPacket with the given data, an offset of 0, and a
size of data.length.
AUdpPacket
public AUdpPacket(byte[] data,
SinkIF compQ)
- Create an AUdpPacket with the given data, an offset of 0, and a
size of data.length, with the given completion queue.
AUdpPacket
public AUdpPacket(byte[] data,
int offset,
int size)
- Create an AUdpPacket with the given data, offset, and size.
AUdpPacket
public AUdpPacket(byte[] data,
int offset,
int size,
SinkIF compQ)
- Create an AUdpPacket with the given data, offset, size, and
completion queue.
AUdpPacket
public AUdpPacket(byte[] data,
int offset,
int size,
SinkIF compQ,
java.net.InetAddress address,
int port)
- Create an AUdpPacket with the given data, offset, size,
completion queue, destination address, and port.
AUdpPacket
public AUdpPacket(int size)
- Create an AUdpPacket with a new data array of the given size.
getAddress
public java.net.InetAddress getAddress()
- Return the destination address. Returns null if not set.
getPort
public int getPort()
- Return the destination port. Returns -1 if not set.