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

seda.sandStorm.lib.aSocket
Class ATcpInPacket

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

public class ATcpInPacket
extends java.lang.Object
implements QueueElementIF

An ATcpInPacket represents a packet which was received from an asynchronous socket. When a packet is received on a connection, an ATcpInPacket is pushed to the SinkIF associated with an ATcpConnection.

Author:
Matt Welsh
See Also:
ATcpConnection

Field Summary
(package private)  long seqNum
           
 
Constructor Summary
ATcpInPacket(ATcpConnection conn, BufferElement buf)
           
ATcpInPacket(ATcpConnection conn, BufferElement buf, long seqNum)
           
ATcpInPacket(ATcpConnection conn, byte[] data, int len)
           
ATcpInPacket(ATcpConnection conn, byte[] data, int len, boolean copy)
           
ATcpInPacket(ATcpConnection conn, byte[] data, int len, boolean copy, long seqNum)
           
ATcpInPacket(ATcpConnection conn, byte[] data, int len, long seqNum)
           
 
Method Summary
 BufferElement getBufferElement()
          Return the BufferElement associated with the packet data.
 byte[] getBytes()
          Return the data from an incoming TCP packet.
 ATcpConnection getConnection()
          Return the connection from which this packet was received.
 long getSequenceNumber()
          Return the sequence number associated with this packet.
 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

ATcpInPacket

public ATcpInPacket(ATcpConnection conn,
                    BufferElement buf)

ATcpInPacket

public ATcpInPacket(ATcpConnection conn,
                    BufferElement buf,
                    long seqNum)

ATcpInPacket

public ATcpInPacket(ATcpConnection conn,
                    byte[] data,
                    int len)

ATcpInPacket

public ATcpInPacket(ATcpConnection conn,
                    byte[] data,
                    int len,
                    long seqNum)

ATcpInPacket

public ATcpInPacket(ATcpConnection conn,
                    byte[] data,
                    int len,
                    boolean copy)

ATcpInPacket

public ATcpInPacket(ATcpConnection conn,
                    byte[] data,
                    int len,
                    boolean copy,
                    long seqNum)
Method Detail

getConnection

public ATcpConnection getConnection()
Return the connection from which this packet was received.

getBytes

public byte[] getBytes()
Return the data from an incoming TCP packet.

size

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

getBufferElement

public BufferElement getBufferElement()
Return the BufferElement associated with 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/