|
INET Framework for OMNeT++/OMNEST
|
Send queue that manages Chunks. More...
#include <TcpSendQueue.h>
Public Member Functions | |
| TcpSendQueue () | |
| Ctor. More... | |
| virtual | ~TcpSendQueue () |
| Virtual dtor. More... | |
| virtual ChunkQueue & | getDataBuffer () |
| virtual void | setConnection (TcpConnection *_conn) |
| Set the connection that owns this queue. More... | |
| virtual void | init (uint32_t startSeq) |
| Initialize the object. More... | |
| virtual std::string | str () const override |
| Returns a string with the region stored. More... | |
| virtual void | enqueueAppData (Packet *msg) |
| Called on SEND app command, it inserts in the queue the data the user wants to send. More... | |
| virtual uint32_t | getBufferStartSeq () const |
| Returns the sequence number of the first byte stored in the buffer. More... | |
| virtual uint32_t | getBufferEndSeq () const |
| Returns the sequence number of the last byte stored in the buffer plus one. More... | |
| virtual uint32_t | getBytesAvailable (uint32_t fromSeq) const |
| Utility function: returns how many bytes are available in the queue, from (and including) the given sequence number. More... | |
| virtual Packet * | createSegmentWithBytes (uint32_t fromSeq, uint32_t numBytes) |
| 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_t seqNum) |
| 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... | |
Protected Attributes | |
| TcpConnection * | conn = nullptr |
| uint32_t | begin = 0 |
| uint32_t | end = 0 |
| ChunkQueue | dataBuffer |
Send queue that manages Chunks.
|
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 than maxNumBytes bytes if the subclass wants to reproduce the original segment boundaries when retransmitting.
Referenced by inet::tcp::TcpConnection::sendSegment().
|
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 inet::tcp::TcpConnection::processAckInEstabEtc(), inet::tcp::TcpConnection::processRstInSynReceived(), and inet::tcp::TcpConnection::processSegmentInSynSent().
|
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.)
Referenced by inet::tcp::TcpConnection::process_SEND().
|
virtual |
Returns the sequence number of the last byte stored in the buffer plus one.
(The first byte of the next send operation would get this sequence number.)
Referenced by inet::tcp::TcpConnection::process_CLOSE(), inet::tcp::TcpConnection::processRstInSynReceived(), inet::tcp::TcpConnection::retransmitData(), and inet::tcp::TcpConnection::retransmitOneSegment().
|
virtual |
Returns the sequence number of the first byte stored in the buffer.
Referenced by inet::tcp::TcpConnection::sendSegment().
|
virtual |
Utility function: returns how many bytes are available in the queue, from (and including) the given sequence number.
Referenced by inet::tcp::TcpConnection::isSendQueueEmpty(), inet::tcp::TcpConnection::nextSeg(), inet::tcp::TcpConnection::process_SEND(), inet::tcp::TcpConnection::retransmitData(), inet::tcp::TcpConnection::retransmitOneSegment(), inet::tcp::TcpConnection::sendData(), inet::tcp::TcpConnection::sendOneNewSegment(), inet::tcp::TcpConnection::sendProbe(), and inet::tcp::TcpConnection::sendSegment().
|
inlinevirtual |
|
virtual |
Initialize the object.
The startSeq parameter tells what sequence number the first byte of app data should get. This is usually ISS + 1 because SYN consumes one byte in the sequence number space.
init() may be called more than once; every call flushes the existing contents of the queue.
Referenced by inet::tcp::TcpConnection::selectInitialSeqNum().
|
inlinevirtual |
Set the connection that owns this queue.
Referenced by inet::tcp::TcpConnection::initClonedConnection(), and inet::tcp::TcpConnection::initConnection().
|
overridevirtual |
Returns a string with the region stored.
|
protected |
Referenced by createSegmentWithBytes(), discardUpTo(), enqueueAppData(), getBufferStartSeq(), init(), and str().
|
protected |
|
protected |
Referenced by createSegmentWithBytes(), discardUpTo(), enqueueAppData(), init(), and str().
|
protected |
Referenced by createSegmentWithBytes(), discardUpTo(), enqueueAppData(), getBufferEndSeq(), getBytesAvailable(), init(), and str().