|
|
| 1296 |
{ |
1296 |
{ |
| 1297 |
break; // No more |
1297 |
break; // No more |
| 1298 |
} |
1298 |
} |
|
|
1299 |
|
| 1300 |
// Nagle's algorithm. Hold off sending if there is unacked data in the |
| 1301 |
// buffer and the amount of data to send is less than a segment size |
| 1302 |
if (UnAckDataCount () > 0 && |
| 1303 |
m_txBuffer.SizeFromSequence (m_nextTxSequence) < m_segmentSize) |
| 1304 |
{ |
| 1305 |
NS_LOG_LOGIC ("Invoking Nagle's algorithm. Wait to send."); |
| 1306 |
break; |
| 1307 |
} |
| 1308 |
|
| 1299 |
uint32_t s = std::min (w, m_segmentSize); // Send no more than window |
1309 |
uint32_t s = std::min (w, m_segmentSize); // Send no more than window |
| 1300 |
Ptr<Packet> p = m_txBuffer.CopyFromSequence (s, m_nextTxSequence); |
1310 |
Ptr<Packet> p = m_txBuffer.CopyFromSequence (s, m_nextTxSequence); |
| 1301 |
NS_LOG_LOGIC ("TcpSocketBase " << this << " SendPendingData" << |
1311 |
NS_LOG_LOGIC ("TcpSocketBase " << this << " SendPendingData" << |