class for managing I/O between applications and TCP
More...
#include <pending-data.h>
List of all members.
Public Member Functions |
| PendingData (uint32_t s, uint8_t *d=NULL, uint32_t msg=0, uint32_t resp=0) |
| PendingData (const std::string &) |
| PendingData (uint8_t *, uint32_t &, Packet *) |
| PendingData (const PendingData &) |
uint32_t | Size () const |
uint8_t * | Serialize (uint8_t *, uint32_t &) |
uint8_t * | Construct (uint8_t *, uint32_t &) |
virtual void | Clear () |
virtual void | Add (uint32_t s, const uint8_t *d=0) |
virtual void | Add (Ptr< Packet > p) |
virtual uint32_t | SizeFromSeq (const SequenceNumber &seqFront, const SequenceNumber &seqOffset) |
virtual uint32_t | SizeFromOffset (uint32_t offset) |
virtual uint32_t | OffsetFromSeq (const SequenceNumber &seqFront, const SequenceNumber &seqOffset) |
virtual Ptr< Packet > | CopyFromOffset (uint32_t, uint32_t) |
virtual Ptr< Packet > | CopyFromSeq (uint32_t, const SequenceNumber &, const SequenceNumber &) |
virtual uint32_t | RemoveToSeq (const SequenceNumber &seqFront, const SequenceNumber &seqOffset) |
PendingData * | Copy () const |
PendingData * | CopyS (uint32_t) |
PendingData * | CopySD (uint32_t, uint8_t *) |
Public Attributes |
uint32_t | size |
std::vector< Ptr< Packet > > | data |
uint32_t | msgSize |
uint32_t | responseSize |
Detailed Description
class for managing I/O between applications and TCP
Member Function Documentation
Subtracts seqFront from seqOffset after enforcing seqFront is less than seqOffset
- Parameters:
-
| seqFront | sequence number to be subtracted from seqOffset |
| seqOffset | higher sequence number |
- Returns:
- seqOffset-seqFront
Permits object to clear any pending data between seqFront and seqOffset - 1). Callers should check the return value to determine whether any data was removed from the front.
- Parameters:
-
| seqFront | sequence number to start to try to remove from |
| seqOffset | first sequence number in buffer that should be retained |
- Returns:
- number of bytes from the front that were removed from the buffer
virtual uint32_t ns3::PendingData::SizeFromOffset |
( |
uint32_t |
offset |
) |
[virtual] |
- Returns:
- number of bytes in the data buffer beyond the offset specified
- Parameters:
-
| offset | offset (from zero) |
This method returns the number of bytes in the PendingData buffer beyond the sequence number specified by seqOffset.
The variables seqFront and seqOffset correspond to a sequence number space in use by the user. What is significant in this method is the difference between them; i.e. the quantity (seqOffset - seqFront). This difference is subtracted from Size(), yielding the number of bytes beyond seqOffset, from the user perspective, in the PendingData buffer.
If the first number specified is not a sequence number that corresponds to the first data byte in the PendingData buffer, the computation returned will be in error.
- Returns:
- number of bytes
- Parameters:
-
| seqFront | sequence number of assumed first byte in the PendingData |
| seqOffset | sequence number of offset |
The documentation for this class was generated from the following file:
- src/internet-stack/pending-data.h