mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 14:07:37 +03:00
2010-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added v key in DHT message. aria2's DHT version is independent of the package version and we defined it as 1 at the moment. It is defined as DHT_VERSION in src/DHTConstants.h. aria2's DHT version scheme is "A2"+2bytes DHT version number in network byte order. * src/DHTAbstractMessage.cc * src/DHTConstants.h * src/DHTMessage.cc * src/DHTMessage.h * src/DHTMessageFactoryImpl.cc * src/DHTQueryMessage.cc * src/DHTResponseMessage.cc * src/util.h * test/DHTAnnouncePeerMessageTest.cc * test/DHTAnnouncePeerReplyMessageTest.cc * test/DHTFindNodeMessageTest.cc * test/DHTFindNodeReplyMessageTest.cc * test/DHTGetPeersMessageTest.cc * test/DHTGetPeersReplyMessageTest.cc * test/DHTPingMessageTest.cc * test/DHTPingReplyMessageTest.cc
This commit is contained in:
parent
d6860e11bf
commit
10edc156ea
17 changed files with 129 additions and 33 deletions
|
@ -58,11 +58,12 @@ void DHTFindNodeMessageTest::testGetBencodedMessage()
|
|||
SharedHandle<DHTNode> targetNode(new DHTNode());
|
||||
|
||||
DHTFindNodeMessage msg(localNode, remoteNode, targetNode->getID(), transactionID);
|
||||
|
||||
msg.setVersion("A200");
|
||||
std::string msgbody = msg.getBencodedMessage();
|
||||
|
||||
BDE dict = BDE::dict();
|
||||
dict["t"] = transactionID;
|
||||
dict["v"] = BDE("A200");
|
||||
dict["y"] = BDE("q");
|
||||
dict["q"] = BDE("find_node");
|
||||
BDE aDict = BDE::dict();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue