summaryrefslogtreecommitdiff
path: root/src/HttpHeaderProcessor.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-06-20 14:43:34 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-06-20 14:43:34 +0000
commitd7155e8f6c1460eb5ff57164da6a05a470ca0e65 (patch)
tree37fee8fa875375c2f8bf0653ff8e8c35a632b70e /src/HttpHeaderProcessor.h
parentbe9dec85357a96e1cf77f743ccf83941a9572aad (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