/* */ #ifndef D_DHT_PEER_ADDR_ENTRY_H #define D_DHT_PEER_ADDR_ENTRY_H #include "common.h" #include #include "TimerA2.h" namespace aria2 { class PeerAddrEntry { private: std::string ipaddr_; uint16_t port_; Timer lastUpdated_; public: PeerAddrEntry(const std::string& ipaddr, uint16_t port, Timer updated = Timer()); PeerAddrEntry(const PeerAddrEntry& c); ~PeerAddrEntry(); PeerAddrEntry& operator=(const PeerAddrEntry& c); const std::string& getIPAddress() const { return ipaddr_; } uint16_t getPort() const { return port_; } const Timer& getLastUpdated() const { return lastUpdated_; } void notifyUpdate(); bool operator==(const PeerAddrEntry& entry) const; }; } // namespace aria2 #endif // D_DHT_PEER_ADDR_ENTRY_H