|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.swans.trans.TransInterface.TransMessage
jist.swans.trans.TransUdp.UdpMessage
public static class TransUdp.UdpMessage
UDP packet structure.
UDP packet: (size = 8 + payload)
src port size: 2
dst port size: 2
payload length size: 2
checksum size: 2
payload size: variable
| Field Summary | |
|---|---|
private int |
dstPort
packet destination address. |
static int |
HEADER_SIZE
UDP packet header size. |
private Message |
payload
packet payload. |
private int |
srcPort
packet source address. |
| Fields inherited from interface jist.swans.misc.Message |
|---|
NULL |
| Constructor Summary | |
|---|---|
TransUdp.UdpMessage(int srcPort,
int dstPort,
Message payload)
Create an new UDP packet. |
|
| Method Summary | |
|---|---|
void |
getBytes(byte[] msg,
int offset)
Store packet into byte array. |
int |
getDstPort()
Return packet destination port. |
Message |
getPayload()
Return packet payload. |
int |
getSize()
Return packet size or Constants.ZERO_WIRE_SIZE. |
int |
getSrcPort()
Return packet source port. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int HEADER_SIZE
private int srcPort
private int dstPort
private Message payload
| Constructor Detail |
|---|
public TransUdp.UdpMessage(int srcPort,
int dstPort,
Message payload)
srcPort - message source portdstPort - message destination portpayload - message payload| Method Detail |
|---|
public int getSrcPort()
public int getDstPort()
public Message getPayload()
public java.lang.String toString()
toString in class java.lang.Objectpublic int getSize()
public void getBytes(byte[] msg,
int offset)
msg - destination byte arrayoffset - byte array starting offset
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||