Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Unified Diff: net/third_party/udt/app/cc.h

Issue 6708091: Remove UDT. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/third_party/udt/app/appserver.cpp ('k') | net/third_party/udt/app/recvfile.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/udt/app/cc.h
===================================================================
--- net/third_party/udt/app/cc.h (revision 78992)
+++ net/third_party/udt/app/cc.h (working copy)
@@ -1,100 +0,0 @@
-#include <udt.h>
-#include <ccc.h>
-
-class CTCP: public CCC
-{
-public:
- void init()
- {
- m_bSlowStart = true;
- m_issthresh = 83333;
-
- m_dPktSndPeriod = 0.0;
- m_dCWndSize = 2.0;
-
- setACKInterval(2);
- setRTO(1000000);
- }
-
- virtual void onACK(const int& ack)
- {
- if (ack == m_iLastACK)
- {
- if (3 == ++ m_iDupACKCount)
- DupACKAction();
- else if (m_iDupACKCount > 3)
- m_dCWndSize += 1.0;
- else
- ACKAction();
- }
- else
- {
- if (m_iDupACKCount >= 3)
- m_dCWndSize = m_issthresh;
-
- m_iLastACK = ack;
- m_iDupACKCount = 1;
-
- ACKAction();
- }
- }
-
- virtual void onTimeout()
- {
- m_issthresh = getPerfInfo()->pktFlightSize / 2;
- if (m_issthresh < 2)
- m_issthresh = 2;
-
- m_bSlowStart = true;
- m_dCWndSize = 2.0;
- }
-
-protected:
- virtual void ACKAction()
- {
- if (m_bSlowStart)
- {
- m_dCWndSize += 1.0;
-
- if (m_dCWndSize >= m_issthresh)
- m_bSlowStart = false;
- }
- else
- m_dCWndSize += 1.0/m_dCWndSize;
- }
-
- virtual void DupACKAction()
- {
- m_bSlowStart = false;
-
- m_issthresh = getPerfInfo()->pktFlightSize / 2;
- if (m_issthresh < 2)
- m_issthresh = 2;
-
- m_dCWndSize = m_issthresh + 3;
- }
-
-protected:
- int m_issthresh;
- bool m_bSlowStart;
-
- int m_iDupACKCount;
- int m_iLastACK;
-};
-
-
-class CUDPBlast: public CCC
-{
-public:
- CUDPBlast()
- {
- m_dPktSndPeriod = 1000000;
- m_dCWndSize = 83333.0;
- }
-
-public:
- void setRate(double mbps)
- {
- m_dPktSndPeriod = (m_iMSS * 8.0) / mbps;
- }
-};
« no previous file with comments | « net/third_party/udt/app/appserver.cpp ('k') | net/third_party/udt/app/recvfile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698