diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-03-20 09:10:23 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-03-20 09:10:23 +0000 |
| commit | 10edc156eabd363e5138d5d974050ea5d7655c30 (patch) | |
| tree | 5ec68b8c1594c33f8f1651f51c0c7108e72cbf78 /test/DHTFindNodeMessageTest.cc | |
| parent | d6860e11bfb23723241bdf5d5b442ced65d7bc23 (diff) | |
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
Diffstat (limited to 'test/DHTFindNodeMessageTest.cc')
| -rw-r--r-- | test/DHTFindNodeMessageTest.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/DHTFindNodeMessageTest.cc b/test/DHTFindNodeMessageTest.cc index 00236dac..9686797b 100644 --- a/test/DHTFindNodeMessageTest.cc +++ b/test/DHTFindNodeMessageTest.cc @@ -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(); |
