/* */ #ifndef D_DHT_GET_PEERS_REPLY_MESSAGE_H #define D_DHT_GET_PEERS_REPLY_MESSAGE_H #include "DHTResponseMessage.h" #include #include "DHTConstants.h" namespace aria2 { class Peer; class DHTGetPeersReplyMessage:public DHTResponseMessage { private: int family_; std::string token_; std::vector> closestKNodes_; std::vector> values_; protected: virtual std::string toStringOptional() const CXX11_OVERRIDE; public: DHTGetPeersReplyMessage(int family, const std::shared_ptr& localNode, const std::shared_ptr& remoteNode, const std::string& token, const std::string& transactionID); virtual void doReceivedAction() CXX11_OVERRIDE; virtual std::unique_ptr getResponse() CXX11_OVERRIDE; virtual const std::string& getMessageType() const CXX11_OVERRIDE; virtual void accept(DHTMessageCallback* callback) CXX11_OVERRIDE; const std::vector>& getClosestKNodes() const { return closestKNodes_; } const std::vector>& getValues() const { return values_; } void setClosestKNodes(std::vector> closestKNodes); void setValues(std::vector> peers); const std::string& getToken() const { return token_; } static const std::string GET_PEERS; static const std::string TOKEN; static const std::string VALUES; static const std::string NODES; static const std::string NODES6; }; } // namespace aria2 #endif // D_DHT_GET_PEERS_REPLY_MESSAGE_H