diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-12-27 18:39:47 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-12-27 18:40:08 +0900 |
| commit | b1132d6b10cd3791b9529d7031d723fd0e2d8215 (patch) | |
| tree | 9ce465b42bf09372118335c7c619bb2b41869eaf /src/LpdMessageDispatcher.h | |
| parent | 4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff) | |
make clang-format using clang-format-3.6
Diffstat (limited to 'src/LpdMessageDispatcher.h')
| -rw-r--r-- | src/LpdMessageDispatcher.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/LpdMessageDispatcher.h b/src/LpdMessageDispatcher.h index 868f3671..cd6f5b47 100644 --- a/src/LpdMessageDispatcher.h +++ b/src/LpdMessageDispatcher.h @@ -54,16 +54,17 @@ private: Timer timer_; std::chrono::seconds interval_; std::string request_; + public: - LpdMessageDispatcher( - const std::string& infoHash, uint16_t port, - const std::string& multicastAddr, uint16_t multicastPort, - std::chrono::seconds interval = 5_min); + LpdMessageDispatcher(const std::string& infoHash, uint16_t port, + const std::string& multicastAddr, uint16_t multicastPort, + std::chrono::seconds interval = 5_min); ~LpdMessageDispatcher(); // No throw - bool init(const std::string& localAddr, unsigned char ttl,unsigned char loop); + bool init(const std::string& localAddr, unsigned char ttl, + unsigned char loop); // Returns true if timer_ reached announce interval, which is by // default 5mins. @@ -76,22 +77,16 @@ public: // Reset timer_ to the current time. void resetAnnounceTimer(); - const std::string& getInfoHash() const - { - return infoHash_; - } + const std::string& getInfoHash() const { return infoHash_; } - uint16_t getPort() const - { - return port_; - } + uint16_t getPort() const { return port_; } }; namespace bittorrent { -std::string createLpdRequest -(const std::string& multicastAddress, uint16_t multicastPort, - const std::string& infoHash, uint16_t port); +std::string createLpdRequest(const std::string& multicastAddress, + uint16_t multicastPort, + const std::string& infoHash, uint16_t port); } // namespace bittorrent |
