|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rtpi.transport.TransportPacket
This is an abstraction of a transport layer packet.
Constructor Summary | |
TransportPacket(int l,
byte[] d)
This constructer is used to construct a packet that should be send over the net. |
|
TransportPacket(int l,
byte[] d,
java.net.InetAddress add,
int p)
This constuctor is used by a transport instance, to encapsulate a data received from the net. |
Method Summary | |
byte[] |
getData()
Get the data included in this packet. |
int |
getLength()
This returns the length of the data (in Bytes) that is included in this packet. |
java.net.InetAddress |
getSenderAddress()
Get the address of the sender. |
int |
getSenderPort()
Get the port of the sender. |
void |
setLength(int len)
This sets the length of the data (in Bytes) that is included in this packet. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public TransportPacket(int l, byte[] d, java.net.InetAddress add, int p)
l
- Length of the data contained in the packet.d
- Data contained in the packet. Note that d.length might
be larger than the number of bytes received from the net.add
- The address of the sender.p
- The port of the sender.public TransportPacket(int l, byte[] d)
l
- Length of the data contained in the packet.d
- Data contained in the packet. Note that d.length might
be larger than the number of bytes received from the net.Method Detail |
public int getLength()
public void setLength(int len)
len
- The length of the data.public byte[] getData()
public int getSenderPort()
public java.net.InetAddress getSenderAddress()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |