INET Framework for OMNeT++/OMNEST
|
Send queue that manages "virtual bytes", that is, byte counts only. More...
#include <TCP_NSC_VirtualDataQueues.h>
Public Member Functions | |
TCP_NSC_VirtualDataSendQueue () | |
Ctor. More... | |
virtual | ~TCP_NSC_VirtualDataSendQueue () |
Virtual dtor. More... | |
virtual void | setConnection (TCP_NSC_Connection *connP) override |
set connection queue, and initialise queue variables. More... | |
virtual void | enqueueAppData (cPacket *msgP) override |
Called on SEND app command, it inserts in the queue the data the user wants to send. More... | |
virtual int | getBytesForTcpLayer (void *bufferP, int bufferLengthP) const override |
Copy data to the buffer for send to NSC. More... | |
virtual void | dequeueTcpLayerMsg (int msgLengthP) override |
The function should remove msgLengthP bytes from NSCqueue. More... | |
virtual unsigned long | getBytesAvailable () const override |
Utility function: returns how many bytes are available in the queue. More... | |
virtual TCPSegment * | createSegmentWithBytes (const void *tcpDataP, int tcpLengthP) override |
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. More... | |
virtual void | discardUpTo (uint32 seqNumP) override |
Tells the queue that bytes up to (but NOT including) seqNum have been transmitted and ACKed, so they can be removed from the queue. More... | |
Public Member Functions inherited from inet::tcp::TCP_NSC_SendQueue | |
TCP_NSC_SendQueue () | |
Ctor. More... | |
virtual | ~TCP_NSC_SendQueue () |
Virtual dtor. More... | |
Protected Attributes | |
long int | unsentNscBytesM |
Protected Attributes inherited from inet::tcp::TCP_NSC_SendQueue | |
TCP_NSC_Connection * | connM |
Send queue that manages "virtual bytes", that is, byte counts only.
inet::tcp::TCP_NSC_VirtualDataSendQueue::TCP_NSC_VirtualDataSendQueue | ( | ) |
Ctor.
|
virtual |
|
overridevirtual |
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 inet::tcp::TCP_NSC_SendQueue.
|
overridevirtual |
The function should remove msgLengthP bytes from NSCqueue.
But the NSC sometimes reread from this datapart (when data destroyed in IP Layer) inside of createSegmentWithBytes() function.
called with return value of socket->send_data() if larger than 0
Implements inet::tcp::TCP_NSC_SendQueue.
|
overridevirtual |
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 inet::tcp::TCP_NSC_SendQueue.
|
overridevirtual |
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 inet::tcp::TCP_NSC_SendQueue.
|
overridevirtual |
Utility function: returns how many bytes are available in the queue.
Implements inet::tcp::TCP_NSC_SendQueue.
|
overridevirtual |
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 inet::tcp::TCP_NSC_SendQueue.
|
overridevirtual |
set connection queue, and initialise queue variables.
Reimplemented from inet::tcp::TCP_NSC_SendQueue.
|
protected |
Referenced by dequeueTcpLayerMsg(), enqueueAppData(), getBytesAvailable(), getBytesForTcpLayer(), and setConnection().