INET Framework for OMNeT++/OMNEST
|
#include <TCP_NSC_VirtualDataQueues.h>
Public Member Functions | |
TCP_NSC_VirtualDataSendQueue () | |
virtual | ~TCP_NSC_VirtualDataSendQueue () |
virtual void | setConnection (TCP_NSC_Connection *connP) |
virtual void | enqueueAppData (cPacket *msgP) |
virtual int | getNscMsg (void *bufferP, int bufferLengthP) |
virtual void | dequeueNscMsg (int msgLengthP) |
ulong | getBytesAvailable () |
virtual TCPSegment * | createSegmentWithBytes (const void *tcpDataP, int tcpLengthP) |
virtual void | discardUpTo (uint32 seqNumP) |
Protected Attributes | |
long int | unsentNscBytesM |
Send/Receive queue that manages "virtual bytes", that is, byte counts only.
TCP_NSC_VirtualDataSendQueue::TCP_NSC_VirtualDataSendQueue | ( | ) |
Ctor.
virtual TCP_NSC_VirtualDataSendQueue::~TCP_NSC_VirtualDataSendQueue | ( | ) | [virtual] |
Virtual dtor.
virtual TCPSegment* TCP_NSC_VirtualDataSendQueue::createSegmentWithBytes | ( | const void * | tcpDataP, |
int | tcpLengthP | ||
) | [virtual] |
Called when the TCP wants to send or retransmit data, it constructs a TCP segment which contains the data from the requested sequence number range. The actually returned segment may contain less then maxNumBytes bytes if the subclass wants to reproduce the original segment boundaries when retransmitting.
called from inside of send_callback() called before called the send() to IP layer
Implements TCP_NSC_SendQueue.
virtual void TCP_NSC_VirtualDataSendQueue::dequeueNscMsg | ( | int | msgLengthP | ) | [virtual] |
Remove msgLengthP bytes from NSCqueue
called with return value of socket->send_data() if larger than 0
Implements TCP_NSC_SendQueue.
virtual void TCP_NSC_VirtualDataSendQueue::discardUpTo | ( | uint32 | seqNumP | ) | [virtual] |
Tells the queue that bytes up to (but NOT including) seqNum have been transmitted and ACKed, so they can be removed from the queue.
Implements TCP_NSC_SendQueue.
virtual void TCP_NSC_VirtualDataSendQueue::enqueueAppData | ( | cPacket * | msgP | ) | [virtual] |
Called on SEND app command, it inserts in the queue the data the user wants to send. Implementations of this abstract class will decide what this means: copying actual bytes, just increasing the "last byte queued" variable, or storing cMessage object(s). The msg object should not be referenced after this point (sendQueue may delete it.)
Implements TCP_NSC_SendQueue.
ulong TCP_NSC_VirtualDataSendQueue::getBytesAvailable | ( | ) | [virtual] |
Utility function: returns how many bytes are available in the queue.
Implements TCP_NSC_SendQueue.
virtual int TCP_NSC_VirtualDataSendQueue::getNscMsg | ( | void * | bufferP, |
int | bufferLengthP | ||
) | [virtual] |
Copy data to the buffer for send to NSC. returns lengh of copied data. create msg for socket->send_data()
called before called socket->send_data()
Implements TCP_NSC_SendQueue.
virtual void TCP_NSC_VirtualDataSendQueue::setConnection | ( | TCP_NSC_Connection * | connP | ) | [virtual] |
set connection queue.
Reimplemented from TCP_NSC_SendQueue.
long int TCP_NSC_VirtualDataSendQueue::unsentNscBytesM [protected] |