INET Framework for OMNeT++/OMNEST
|
Send queue that manages messages. More...
#include <TCPByteStreamSendQueue.h>
Public Member Functions | |
TCPByteStreamSendQueue () | |
Ctor. More... | |
virtual | ~TCPByteStreamSendQueue () |
Virtual dtor. More... | |
virtual void | init (uint32 startSeq) override |
Initialize the object. More... | |
virtual std::string | info () const override |
virtual void | enqueueAppData (cPacket *msg) override |
Called on SEND app command, it inserts in the queue the data the user wants to send. More... | |
virtual uint32 | getBufferStartSeq () override |
Returns the sequence number of the first byte stored in the buffer. More... | |
virtual uint32 | getBufferEndSeq () override |
Returns the sequence number of the last byte stored in the buffer plus one. More... | |
virtual TCPSegment * | createSegmentWithBytes (uint32 fromSeq, ulong numBytes) 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 seqNum) 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::TCPSendQueue | |
TCPSendQueue () | |
Ctor. More... | |
virtual | ~TCPSendQueue () |
Virtual dtor. More... | |
virtual void | setConnection (TCPConnection *_conn) |
Set the connection that owns this queue. More... | |
ulong | getBytesAvailable (uint32 fromSeq) |
Utility function: returns how many bytes are available in the queue, from (and including) the given sequence number. More... | |
Protected Attributes | |
ByteArrayBuffer | dataBuffer |
uint32 | begin |
uint32 | end |
Protected Attributes inherited from inet::tcp::TCPSendQueue | |
TCPConnection * | conn |
Send queue that manages messages.
inet::tcp::TCPByteStreamSendQueue::TCPByteStreamSendQueue | ( | ) |
Ctor.
|
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 than maxNumBytes bytes if the subclass wants to reproduce the original segment boundaries when retransmitting.
Implements inet::tcp::TCPSendQueue.
|
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::TCPSendQueue.
|
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::TCPSendQueue.
|
overridevirtual |
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.)
Implements inet::tcp::TCPSendQueue.
|
overridevirtual |
Returns the sequence number of the first byte stored in the buffer.
Implements inet::tcp::TCPSendQueue.
|
overridevirtual |
|
overridevirtual |
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.
Implements inet::tcp::TCPSendQueue.
|
protected |
Referenced by createSegmentWithBytes(), discardUpTo(), getBufferStartSeq(), info(), init(), and TCPByteStreamSendQueue().
|
protected |
Referenced by createSegmentWithBytes(), discardUpTo(), enqueueAppData(), info(), and init().
|
protected |
Referenced by createSegmentWithBytes(), discardUpTo(), enqueueAppData(), getBufferEndSeq(), info(), init(), and TCPByteStreamSendQueue().