/* */ #include "PeerAddrEntry.h" #include "wallclock.h" namespace aria2 { PeerAddrEntry::PeerAddrEntry (const std::string& ipaddr, uint16_t port, Timer updated) : ipaddr_(ipaddr), port_(port), lastUpdated_(updated) {} PeerAddrEntry::PeerAddrEntry(const PeerAddrEntry& c) : ipaddr_(c.ipaddr_), port_(c.port_), lastUpdated_(c.lastUpdated_) {} PeerAddrEntry::~PeerAddrEntry() {} PeerAddrEntry& PeerAddrEntry::operator=(const PeerAddrEntry& c) { if(this != &c) { ipaddr_ = c.ipaddr_; port_ = c.port_; lastUpdated_ = c.lastUpdated_; } return *this; } void PeerAddrEntry::notifyUpdate() { lastUpdated_ = global::wallclock(); } bool PeerAddrEntry::operator==(const PeerAddrEntry& entry) const { return ipaddr_ == entry.ipaddr_ && port_ == entry.port_; } } // namespace aria2