diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-06-20 14:43:34 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-06-20 14:43:34 +0000 |
| commit | d7155e8f6c1460eb5ff57164da6a05a470ca0e65 (patch) | |
| tree | 37fee8fa875375c2f8bf0653ff8e8c35a632b70e /src/HttpHeaderProcessor.h | |
| parent | be9dec85357a96e1cf77f743ccf83941a9572aad (diff) | |
2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Reduce the number of calls to gettimeofday to lower CPU load.
* src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New
function.
* src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New
function.
* src/Peer.h (calculateUploadSpeed): New function.
(calculateDownloadSpeed): New function.
* src/DefaultPeerStorage.cc
(CalculateStat): Added _now variable.
In operator(), call Peer::calculateDownloadSpeed(const struct
timeval&)
and Peer::calculateUploadSpeed(const struct timeval&)
Drop connection if no request or piece message is exchanged in
a certain interval.
* src/DefaultBtInteractive.h
(btRuntime): New variable.
(inactiveCheckPoint): New variable.
(checkActiveInteraction): New function.
* src/DefaultBtInteractive.cc (receiveMessages): Reset timer
when
request or piece message is received.
(checkActiveInteraction): New function.
(doInteractionProcessing): Call checkActiveInteraction.
Fixed the bug that causes remote Metalink and Torrent files are
not
processed.
* src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the
bug.
Diffstat (limited to 'src/HttpHeaderProcessor.h')
0 files changed, 0 insertions, 0 deletions
