mirror of
https://github.com/aria2/aria2.git
synced 2025-04-04 21:17:41 +03:00
2009-09-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Move all functions in PeerMessageUtil to bittorrent_helper. * src/BtBitfieldMessage.cc * src/BtBitfieldMessageValidator.h * src/BtExtendedMessage.cc * src/BtHandshakeMessage.cc * src/BtHandshakeMessageValidator.h * src/BtPieceMessage.cc * src/BtPieceMessageValidator.h * src/BtPortMessage.cc * src/DHTFindNodeReplyMessage.cc * src/DHTGetPeersReplyMessage.cc * src/DHTMessageFactoryImpl.cc * src/DHTRoutingTableDeserializer.cc * src/DHTRoutingTableSerializer.cc * src/DHTTokenTracker.cc * src/DefaultBtMessageFactory.cc * src/IndexBtMessage.cc * src/IndexBtMessage.h * src/IndexBtMessageValidator.h * src/Makefile.am * src/PeerMessageUtil.cc: Removed. * src/PeerMessageUtil.h: Removed. * src/RangeBtMessage.cc * src/RangeBtMessage.h * src/RangeBtMessageValidator.h * src/UTPexExtensionMessage.cc * src/ZeroBtMessage.cc * src/ZeroBtMessage.h * src/bittorrent_helper.cc * src/bittorrent_helper.h * test/BittorrentHelperTest.cc * test/BtAllowedFastMessageTest.cc * test/BtBitfieldMessageTest.cc * test/BtCancelMessageTest.cc * test/BtChokeMessageTest.cc * test/BtExtendedMessageTest.cc * test/BtHandshakeMessageTest.cc * test/BtHaveAllMessageTest.cc * test/BtHaveMessageTest.cc * test/BtHaveNoneMessageTest.cc * test/BtInterestedMessageTest.cc * test/BtNotInterestedMessageTest.cc * test/BtPieceMessageTest.cc * test/BtPortMessageTest.cc * test/BtRejectMessageTest.cc * test/BtRequestMessageTest.cc * test/BtSuggestPieceMessageTest.cc * test/BtUnchokeMessageTest.cc * test/DHTFindNodeReplyMessageTest.cc * test/DHTGetPeersReplyMessageTest.cc * test/DHTMessageFactoryImplTest.cc * test/DHTRoutingTableDeserializerTest.cc * test/DHTRoutingTableSerializerTest.cc * test/DefaultBtMessageFactoryTest.cc * test/DefaultExtensionMessageFactoryTest.cc * test/Makefile.am * test/PeerListProcessorTest.cc * test/PeerMessageUtilTest.cc: Removed. * test/UTPexExtensionMessageTest.cc
This commit is contained in:
parent
2e8b0d785e
commit
99654e4160
61 changed files with 607 additions and 630 deletions
|
@ -4,7 +4,7 @@
|
|||
#include "DHTNode.h"
|
||||
#include "array_fun.h"
|
||||
#include "DHTConstants.h"
|
||||
#include "PeerMessageUtil.h"
|
||||
#include "bittorrent_helper.h"
|
||||
#include "a2netcompat.h"
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
|
@ -112,7 +112,7 @@ void DHTRoutingTableSerializerTest::testSerialize()
|
|||
ss.read(buf, 6);
|
||||
{
|
||||
std::pair<std::string, uint16_t> peer =
|
||||
PeerMessageUtil::unpackcompact(reinterpret_cast<const unsigned char*>(buf));
|
||||
bittorrent::unpackcompact(reinterpret_cast<const unsigned char*>(buf));
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("192.168.0.1"), peer.first);
|
||||
CPPUNIT_ASSERT_EQUAL((uint16_t)6881, peer.second);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ void DHTRoutingTableSerializerTest::testSerialize()
|
|||
ss.read(buf, 6);
|
||||
{
|
||||
std::pair<std::string, uint16_t> peer =
|
||||
PeerMessageUtil::unpackcompact(reinterpret_cast<const unsigned char*>(buf));
|
||||
bittorrent::unpackcompact(reinterpret_cast<const unsigned char*>(buf));
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("192.168.0.3"), peer.first);
|
||||
CPPUNIT_ASSERT_EQUAL((uint16_t)6883, peer.second);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue