INET Framework for OMNeT++/OMNEST
|
Send queue that manages "objects". More...
#include <TcpLwipMsgBasedQueues.h>
Classes | |
struct | Payload |
Public Member Functions | |
TcpLwipMsgBasedSendQueue () | |
Ctor. More... | |
virtual | ~TcpLwipMsgBasedSendQueue () |
Virtual dtor. More... | |
virtual void | setConnection (TcpLwipConnection *connP) override |
set connection queue. 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 unsigned int | getBytesForTcpLayer (void *bufferP, unsigned int bufferLengthP) const override |
Copy data to the buffer for send to LWIP. More... | |
virtual void | dequeueTcpLayerMsg (unsigned int msgLengthP) override |
Remove msgLengthP bytes from TCP Layer queue. More... | |
unsigned long | getBytesAvailable () const override |
Utility function: returns how many bytes are available in the queue. More... | |
virtual TCPSegment * | createSegmentWithBytes (const void *tcpDataP, unsigned 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 | discardAckedBytes () |
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::TcpLwipSendQueue | |
TcpLwipSendQueue () | |
Ctor. More... | |
virtual | ~TcpLwipSendQueue () |
Virtual dtor. More... | |
Protected Types | |
typedef std::list< Payload > | PayloadQueue |
Protected Attributes | |
PayloadQueue | payloadQueueM |
uint32 | beginM |
uint32 | endM |
bool | isValidSeqNoM |
unsigned long int | unsentTcpLayerBytesM |
Protected Attributes inherited from inet::tcp::TcpLwipSendQueue | |
TcpLwipConnection * | connM |
Send queue that manages "objects".
|
protected |
inet::tcp::TcpLwipMsgBasedSendQueue::TcpLwipMsgBasedSendQueue | ( | ) |
Ctor.
|
virtual |
Virtual dtor.
|
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
tcpDataP | the tcp segment (with tcp header) created by LWIP |
tcpLenthP | the length of tcp segment. |
Implements inet::tcp::TcpLwipSendQueue.
|
overridevirtual |
Remove msgLengthP bytes from TCP Layer queue.
called with return value of socket->send_data() if larger than 0
Implements inet::tcp::TcpLwipSendQueue.
|
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.
Referenced by createSegmentWithBytes().
|
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::TcpLwipSendQueue.
|
overridevirtual |
Utility function: returns how many bytes are available in the queue.
Implements inet::tcp::TcpLwipSendQueue.
|
overridevirtual |
Copy data to the buffer for send to LWIP.
returns lengh of copied data. create msg for socket->send_data()
called before called socket->send_data()
Implements inet::tcp::TcpLwipSendQueue.
|
overridevirtual |
set connection queue.
Reimplemented from inet::tcp::TcpLwipSendQueue.
|
protected |
Referenced by createSegmentWithBytes(), discardAckedBytes(), and setConnection().
|
protected |
Referenced by createSegmentWithBytes(), discardAckedBytes(), enqueueAppData(), and setConnection().
|
protected |
Referenced by createSegmentWithBytes(), discardAckedBytes(), and setConnection().
|
protected |
Referenced by createSegmentWithBytes(), discardAckedBytes(), enqueueAppData(), and ~TcpLwipMsgBasedSendQueue().
|
protected |
Referenced by createSegmentWithBytes(), dequeueTcpLayerMsg(), enqueueAppData(), getBytesAvailable(), getBytesForTcpLayer(), and setConnection().