#include <TCPReceiveQueue.h>
Inheritance diagram for TCPReceiveQueue:

This class goes hand-in-hand with TCPSendQueue.
This class is polymorphic because depending on where and how you use the TCP model you might have different ideas about "sending data" on a simulated connection: you might want to transmit real bytes, "dummy" (byte count only), cMessage objects, etc; see discussion at TCPSendQueue. Different subclasses can be written to accomodate different needs.
Public Member Functions | |
| TCPReceiveQueue () | |
| virtual | ~TCPReceiveQueue () |
| virtual void | init (uint32 startSeq)=0 |
| virtual uint32 | insertBytesFromSegment (TCPSegment *tcpseg)=0 |
| virtual cMessage * | extractBytesUpTo (uint32 seq)=0 |
Protected Attributes | |
| TCPConnection * | conn |
| TCPReceiveQueue::TCPReceiveQueue | ( | ) | [inline] |
| virtual cMessage* TCPReceiveQueue::extractBytesUpTo | ( | uint32 | seq | ) | [pure virtual] |
Should create a packet to be passed up to the app, up to (but NOT including) the given sequence no (usually rcv_nxt). It should return NULL if there's no more data to be passed up -- this method is called several times until it returns NULL.
Implemented in TCPMsgBasedRcvQueue, and TCPVirtualDataRcvQueue.
| virtual void TCPReceiveQueue::init | ( | uint32 | startSeq | ) | [pure virtual] |
Set initial receive sequence number.
Implemented in TCPMsgBasedRcvQueue, and TCPVirtualDataRcvQueue.
| virtual uint32 TCPReceiveQueue::insertBytesFromSegment | ( | TCPSegment * | tcpseg | ) | [pure virtual] |
Called when a TCP segment arrives, it should extract the payload from the segment and store it in the receive queue. The segment object should *not* be deleted.
The method should return the sequence number to be ACKed.
Implemented in TCPMsgBasedRcvQueue, and TCPVirtualDataRcvQueue.
TCPConnection* TCPReceiveQueue::conn [protected] |
1.4.7