MCPcopy Create free account
hub / github.com/amule-project/amule / TickDownloadAndMeasure

Method TickDownloadAndMeasure

src/BaseClient.cpp:2377–2395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2375}
2376
2377float CUpDownClient::TickDownloadAndMeasure()
2378{
2379 // lfroen: in daemon it actually can happen
2380 wxASSERT( m_socket );
2381
2382 float kBpsClient = CalculateKBpsDown();
2383
2384 if ( m_socket ) {
2385 // Wake the socket if it suspended last tick because the global
2386 // CDownloadBandwidthThrottler bucket was empty -- this is the
2387 // per-tick poke that lets paused reads retry against the
2388 // freshly refilled budget.
2389 m_socket->WakeIfPaused();
2390 } else {
2391 AddLogLineNS(CFormat("CAUGHT DEAD SOCKET IN TICKDOWNLOADANDMEASURE() WITH SPEED %f") % kBpsClient);
2392 }
2393
2394 return kBpsClient;
2395}
2396
2397void CUpDownClient::SetUserIDHybrid(uint32 nUserID)
2398{

Callers 1

ProcessMethod · 0.80

Calls 2

CFormatClass · 0.85
WakeIfPausedMethod · 0.80

Tested by

no test coverage detected