/* */ #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; public: DHTGetPeersReplyMessage(int family, const SharedHandle& localNode, const SharedHandle& remoteNode, const std::string& token, const std::string& transactionID); virtual ~DHTGetPeersReplyMessage(); virtual void doReceivedAction(); virtual SharedHandle getResponse(); virtual const std::string& getMessageType() const; virtual void accept(DHTMessageCallback* callback); const std::vector >& getClosestKNodes() const { return closestKNodes_; } const std::vector >& getValues() const { return values_; } void setClosestKNodes (const std::vector >& closestKNodes) { closestKNodes_ = closestKNodes; } void setValues(const std::vector >& peers) { values_ = 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