/* */ #include "DHTPingReplyMessage.h" #include #include "DHTNode.h" #include "DHTMessageCallback.h" namespace aria2 { const std::string DHTPingReplyMessage::PING("ping"); DHTPingReplyMessage::DHTPingReplyMessage( const std::shared_ptr& localNode, const std::shared_ptr& remoteNode, const unsigned char* id, const std::string& transactionID) : DHTResponseMessage(localNode, remoteNode, transactionID) { memcpy(id_, id, DHT_ID_LENGTH); } void DHTPingReplyMessage::doReceivedAction() {} std::unique_ptr DHTPingReplyMessage::getResponse() { auto rDict = Dict::g(); rDict->put(DHTMessage::ID, String::g(id_, DHT_ID_LENGTH)); return rDict; } const std::string& DHTPingReplyMessage::getMessageType() const { return PING; } void DHTPingReplyMessage::accept(DHTMessageCallback* callback) { callback->visit(this); } } // namespace aria2