mdw.sandStorm.lib.aSocket
Class ATcpInPacket
java.lang.Object
|
+--mdw.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)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
seqNum
long seqNum
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)
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