LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2010 Adrian Sai-wah Tam | 3 * Copyright (c) 2010 Adrian Sai-wah Tam |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 * m_segmentSize are set by the attribute system in ns3::TcpSocket. | 76 * m_segmentSize are set by the attribute system in ns3::TcpSocket. |
77 */ | 77 */ |
78 m_cWnd = m_initialCWnd * m_segmentSize; | 78 m_cWnd = m_initialCWnd * m_segmentSize; |
79 } | 79 } |
80 | 80 |
81 /** Limit the size of in-flight data by cwnd and receiver's rxwin */ | 81 /** Limit the size of in-flight data by cwnd and receiver's rxwin */ |
82 uint32_t | 82 uint32_t |
83 TcpTahoe::Window (void) | 83 TcpTahoe::Window (void) |
84 { | 84 { |
85 NS_LOG_FUNCTION (this); | 85 NS_LOG_FUNCTION (this); |
86 return std::min (m_rxWindowSize, m_cWnd.Get ()); | 86 return std::min (m_rWnd.Get (), m_cWnd.Get ()); |
87 } | 87 } |
88 | 88 |
89 Ptr<TcpSocketBase> | 89 Ptr<TcpSocketBase> |
90 TcpTahoe::Fork (void) | 90 TcpTahoe::Fork (void) |
91 { | 91 { |
92 return CopyObject<TcpTahoe> (this); | 92 return CopyObject<TcpTahoe> (this); |
93 } | 93 } |
94 | 94 |
95 /** New ACK (up to seqnum seq) received. Increase cwnd and call TcpSocketBase::N
ewAck() */ | 95 /** New ACK (up to seqnum seq) received. Increase cwnd and call TcpSocketBase::N
ewAck() */ |
96 void | 96 void |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 m_cWnd = m_initialCWnd * m_segmentSize; | 181 m_cWnd = m_initialCWnd * m_segmentSize; |
182 } | 182 } |
183 | 183 |
184 uint32_t | 184 uint32_t |
185 TcpTahoe::GetInitialCwnd (void) const | 185 TcpTahoe::GetInitialCwnd (void) const |
186 { | 186 { |
187 return m_initialCWnd; | 187 return m_initialCWnd; |
188 } | 188 } |
189 | 189 |
190 } // namespace ns3 | 190 } // namespace ns3 |
LEFT | RIGHT |