diff options
Diffstat (limited to 'src/PeerStat.h')
| -rw-r--r-- | src/PeerStat.h | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/PeerStat.h b/src/PeerStat.h index 09f1ec53..2def238b 100644 --- a/src/PeerStat.h +++ b/src/PeerStat.h @@ -46,8 +46,8 @@ namespace aria2 { class PeerStat { public: - PeerStat - (cuid_t cuid, const std::string& hostname, const::std::string& protocol); + PeerStat(cuid_t cuid, const std::string& hostname, + const ::std::string& protocol); PeerStat(cuid_t cuid = 0); @@ -68,9 +68,9 @@ public: int calculateAvgUploadSpeed(); - void updateDownloadLength(size_t bytes); + void updateDownload(size_t bytes); - void updateUploadLength(size_t bytes); + void updateUpload(size_t bytes); int getMaxDownloadSpeed() const; @@ -98,20 +98,12 @@ public: TransferStat toTransferStat(); - cuid_t getCuid() const - { - return cuid_; - } + cuid_t getCuid() const { return cuid_; } - const std::string& getHostname() const - { - return hostname_; - } + const std::string& getHostname() const { return hostname_; } + + const std::string& getProtocol() const { return protocol_; } - const std::string& getProtocol() const - { - return protocol_; - } private: cuid_t cuid_; std::string hostname_; |
