summaryrefslogtreecommitdiff
path: root/src/DHTFindNodeMessage.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/DHTFindNodeMessage.cc')
-rw-r--r--src/DHTFindNodeMessage.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/DHTFindNodeMessage.cc b/src/DHTFindNodeMessage.cc
index 951c14e3..f5b0ab2c 100644
--- a/src/DHTFindNodeMessage.cc
+++ b/src/DHTFindNodeMessage.cc
@@ -45,6 +45,10 @@
namespace aria2 {
+const std::string DHTFindNodeMessage::FIND_NODE("find_node");
+
+const std::string DHTFindNodeMessage::TARGET_NODE("target");
+
DHTFindNodeMessage::DHTFindNodeMessage(const SharedHandle<DHTNode>& localNode,
const SharedHandle<DHTNode>& remoteNode,
const unsigned char* targetNodeID,
@@ -68,16 +72,16 @@ void DHTFindNodeMessage::doReceivedAction()
Dictionary* DHTFindNodeMessage::getArgument()
{
Dictionary* a = new Dictionary();
- a->put("id", new Data(reinterpret_cast<const char*>(_localNode->getID()),
+ a->put(DHTMessage::ID, new Data(reinterpret_cast<const char*>(_localNode->getID()),
DHT_ID_LENGTH));
- a->put("target", new Data(reinterpret_cast<const char*>(_targetNodeID),
+ a->put(TARGET_NODE, new Data(reinterpret_cast<const char*>(_targetNodeID),
DHT_ID_LENGTH));
return a;
}
std::string DHTFindNodeMessage::getMessageType() const
{
- return "find_node";
+ return FIND_NODE;
}
void DHTFindNodeMessage::validate() const {}