More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

seda.sandStorm.lib.aSocket
Class AUdpInPacket

java.lang.Object
  |
  +--seda.sandStorm.lib.aSocket.AUdpInPacket
All Implemented Interfaces:
QueueElementIF

public class AUdpInPacket
extends java.lang.Object
implements QueueElementIF

An AUdpInPacket represents a packet which was received from a datagram socket.

Author:
Matt Welsh

Field Summary
(package private)  long seqNum
           
 
Constructor Summary
AUdpInPacket(AUdpSocket sock, java.net.DatagramPacket packet)
           
AUdpInPacket(AUdpSocket sock, java.net.DatagramPacket packet, long seqNum)
           
 
Method Summary
 byte[] getBytes()
          Return the packet data.
 java.net.DatagramPacket getPacket()
          Return the DatagramPacket.
 long getSequenceNumber()
          Return the sequence number associated with this packet.
 AUdpSocket getSocket()
          Return the socket from which this packet was received.
 int size()
          Return the size of the packet data.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

seqNum

long seqNum
Constructor Detail

AUdpInPacket

public AUdpInPacket(AUdpSocket sock,
                    java.net.DatagramPacket packet)

AUdpInPacket

public AUdpInPacket(AUdpSocket sock,
                    java.net.DatagramPacket packet,
                    long seqNum)
Method Detail

getSocket

public AUdpSocket getSocket()
Return the socket from which this packet was received.

getPacket

public java.net.DatagramPacket getPacket()
Return the DatagramPacket.

getBytes

public byte[] getBytes()
Return the packet data.

size

public int size()
Return the size of the packet data.

getSequenceNumber

public long getSequenceNumber()
Return the sequence number associated with this packet. Sequence numbers range from 1 to Long.MAX_VALUE, then wrap around to Long.MIN_VALUE. A sequence number of 0 indicates that no sequence number was associated with this packet when it was created.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/