mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 13:37:40 +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
|
@ -10,7 +10,7 @@
|
|||
#include "DHTNode.h"
|
||||
#include "DHTRoutingTable.h"
|
||||
#include "Peer.h"
|
||||
#include "PeerMessageUtil.h"
|
||||
#include "bittorrent_helper.h"
|
||||
#include "DHTBucket.h"
|
||||
#include "DHTPingMessage.h"
|
||||
#include "DHTPingReplyMessage.h"
|
||||
|
@ -169,7 +169,7 @@ void DHTMessageFactoryImplTest::testCreateFindNodeReplyMessage()
|
|||
nodes[i]->setPort(6881+i);
|
||||
|
||||
unsigned char buf[6];
|
||||
CPPUNIT_ASSERT(PeerMessageUtil::createcompact
|
||||
CPPUNIT_ASSERT(bittorrent::createcompact
|
||||
(buf, nodes[i]->getIPAddress(), nodes[i]->getPort()));
|
||||
compactNodeInfo +=
|
||||
std::string(&nodes[i]->getID()[0], &nodes[i]->getID()[DHT_ID_LENGTH])+
|
||||
|
@ -244,7 +244,7 @@ void DHTMessageFactoryImplTest::testCreateGetPeersReplyMessage_nodes()
|
|||
nodes[i]->setPort(6881+i);
|
||||
|
||||
unsigned char buf[6];
|
||||
CPPUNIT_ASSERT(PeerMessageUtil::createcompact
|
||||
CPPUNIT_ASSERT(bittorrent::createcompact
|
||||
(buf, nodes[i]->getIPAddress(), nodes[i]->getPort()));
|
||||
compactNodeInfo +=
|
||||
std::string(&nodes[i]->getID()[0], &nodes[i]->getID()[DHT_ID_LENGTH])+
|
||||
|
@ -291,8 +291,8 @@ void DHTMessageFactoryImplTest::testCreateGetPeersReplyMessage_values()
|
|||
for(size_t i = 0; i < 4; ++i) {
|
||||
SharedHandle<Peer> peer(new Peer("192.168.0."+Util::uitos(i+1), 6881+i));
|
||||
unsigned char buffer[6];
|
||||
CPPUNIT_ASSERT(PeerMessageUtil::createcompact(buffer, peer->ipaddr,
|
||||
peer->port));
|
||||
CPPUNIT_ASSERT(bittorrent::createcompact
|
||||
(buffer, peer->ipaddr, peer->port));
|
||||
valuesList << BDE(buffer, sizeof(buffer));
|
||||
peers.push_back(peer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue