aria2/test/FeatureConfigTest.cc

97 lines
2.1 KiB
C++
Raw Normal View History

2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> * src/TorrentMan.h: (advertisePiece): Updated doc. (getAdvertisedPieceIndexes): Updated doc. (removeAdvertisedPiece); New function. * src/TorrentMan.cc (FindElapsedHave): New function object. (removeAdvertisedPiece): New function. * src/HaveEraseCommand.h: New class. * src/HaveEraseCommand.cc: New class. * src/FeatureConfig.h: New class. * src/FeatureConfig.cc: New class. * src/Request.h (defaultPorts): Removed. * src/Request.cc (FeatureConfig.h): Included. (Request): Removed the statements related to defaultPorts. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead. A default port number is now retrieved from FeatureConfig. * src/main.cc (HaveEraseCommand.h): Included. (showVersion): Added the output of feature list. (main): Added HaveEraseCommand to command queue in BitTorrent downloading. * src/PeerInteractionCommand.h (chokeCheckPoint): Commented out. (periodicExecPoint): New variable. * src/PeerInteractionCommand.cc (executeInternal): Following methods are now called in at least every 0.5 seconds to reduce CPU usage: detectMessageFlooding(), peerInteraction->checkRequestSlot(), checkHave(), sendKeepAlive(). (checkLongTimePeerChoking): Commented out. * src/BitfieldMan.h (getNthBitIndex): Changed the method signature. (getMissingIndexRandomly): Changed the method signature. * src/BitfieldMan.cc (getNthBitIndex): Rewritten (getMissingIndexRandomly): Rewritten. (hasMissingPiece): Rewritten. (getMissingIndex): Refactored. (getMissingUnusedIndex); Refactored. (getMissingIndex): Refactored.
2006-07-30 12:58:27 +00:00
#include "FeatureConfig.h"
#include <algorithm>
#include <cppunit/extensions/HelperMacros.h>
#include "a2functional.h"
#include "array_fun.h"
#include "util.h"
2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> * src/TorrentMan.h: (advertisePiece): Updated doc. (getAdvertisedPieceIndexes): Updated doc. (removeAdvertisedPiece); New function. * src/TorrentMan.cc (FindElapsedHave): New function object. (removeAdvertisedPiece): New function. * src/HaveEraseCommand.h: New class. * src/HaveEraseCommand.cc: New class. * src/FeatureConfig.h: New class. * src/FeatureConfig.cc: New class. * src/Request.h (defaultPorts): Removed. * src/Request.cc (FeatureConfig.h): Included. (Request): Removed the statements related to defaultPorts. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead. A default port number is now retrieved from FeatureConfig. * src/main.cc (HaveEraseCommand.h): Included. (showVersion): Added the output of feature list. (main): Added HaveEraseCommand to command queue in BitTorrent downloading. * src/PeerInteractionCommand.h (chokeCheckPoint): Commented out. (periodicExecPoint): New variable. * src/PeerInteractionCommand.cc (executeInternal): Following methods are now called in at least every 0.5 seconds to reduce CPU usage: detectMessageFlooding(), peerInteraction->checkRequestSlot(), checkHave(), sendKeepAlive(). (checkLongTimePeerChoking): Commented out. * src/BitfieldMan.h (getNthBitIndex): Changed the method signature. (getMissingIndexRandomly): Changed the method signature. * src/BitfieldMan.cc (getNthBitIndex): Rewritten (getMissingIndexRandomly): Rewritten. (hasMissingPiece): Rewritten. (getMissingIndex): Refactored. (getMissingUnusedIndex); Refactored. (getMissingIndex): Refactored.
2006-07-30 12:58:27 +00:00
namespace aria2 {
2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> * src/TorrentMan.h: (advertisePiece): Updated doc. (getAdvertisedPieceIndexes): Updated doc. (removeAdvertisedPiece); New function. * src/TorrentMan.cc (FindElapsedHave): New function object. (removeAdvertisedPiece): New function. * src/HaveEraseCommand.h: New class. * src/HaveEraseCommand.cc: New class. * src/FeatureConfig.h: New class. * src/FeatureConfig.cc: New class. * src/Request.h (defaultPorts): Removed. * src/Request.cc (FeatureConfig.h): Included. (Request): Removed the statements related to defaultPorts. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead. A default port number is now retrieved from FeatureConfig. * src/main.cc (HaveEraseCommand.h): Included. (showVersion): Added the output of feature list. (main): Added HaveEraseCommand to command queue in BitTorrent downloading. * src/PeerInteractionCommand.h (chokeCheckPoint): Commented out. (periodicExecPoint): New variable. * src/PeerInteractionCommand.cc (executeInternal): Following methods are now called in at least every 0.5 seconds to reduce CPU usage: detectMessageFlooding(), peerInteraction->checkRequestSlot(), checkHave(), sendKeepAlive(). (checkLongTimePeerChoking): Commented out. * src/BitfieldMan.h (getNthBitIndex): Changed the method signature. (getMissingIndexRandomly): Changed the method signature. * src/BitfieldMan.cc (getNthBitIndex): Rewritten (getMissingIndexRandomly): Rewritten. (hasMissingPiece): Rewritten. (getMissingIndex): Refactored. (getMissingUnusedIndex); Refactored. (getMissingIndex): Refactored.
2006-07-30 12:58:27 +00:00
class FeatureConfigTest:public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(FeatureConfigTest);
CPPUNIT_TEST(testGetDefaultPort);
CPPUNIT_TEST(testStrSupportedFeature);
CPPUNIT_TEST(testFeatureSummary);
2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> * src/TorrentMan.h: (advertisePiece): Updated doc. (getAdvertisedPieceIndexes): Updated doc. (removeAdvertisedPiece); New function. * src/TorrentMan.cc (FindElapsedHave): New function object. (removeAdvertisedPiece): New function. * src/HaveEraseCommand.h: New class. * src/HaveEraseCommand.cc: New class. * src/FeatureConfig.h: New class. * src/FeatureConfig.cc: New class. * src/Request.h (defaultPorts): Removed. * src/Request.cc (FeatureConfig.h): Included. (Request): Removed the statements related to defaultPorts. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead. A default port number is now retrieved from FeatureConfig. * src/main.cc (HaveEraseCommand.h): Included. (showVersion): Added the output of feature list. (main): Added HaveEraseCommand to command queue in BitTorrent downloading. * src/PeerInteractionCommand.h (chokeCheckPoint): Commented out. (periodicExecPoint): New variable. * src/PeerInteractionCommand.cc (executeInternal): Following methods are now called in at least every 0.5 seconds to reduce CPU usage: detectMessageFlooding(), peerInteraction->checkRequestSlot(), checkHave(), sendKeepAlive(). (checkLongTimePeerChoking): Commented out. * src/BitfieldMan.h (getNthBitIndex): Changed the method signature. (getMissingIndexRandomly): Changed the method signature. * src/BitfieldMan.cc (getNthBitIndex): Rewritten (getMissingIndexRandomly): Rewritten. (hasMissingPiece): Rewritten. (getMissingIndex): Refactored. (getMissingUnusedIndex); Refactored. (getMissingIndex): Refactored.
2006-07-30 12:58:27 +00:00
CPPUNIT_TEST_SUITE_END();
public:
void testGetDefaultPort();
void testStrSupportedFeature();
void testFeatureSummary();
2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> * src/TorrentMan.h: (advertisePiece): Updated doc. (getAdvertisedPieceIndexes): Updated doc. (removeAdvertisedPiece); New function. * src/TorrentMan.cc (FindElapsedHave): New function object. (removeAdvertisedPiece): New function. * src/HaveEraseCommand.h: New class. * src/HaveEraseCommand.cc: New class. * src/FeatureConfig.h: New class. * src/FeatureConfig.cc: New class. * src/Request.h (defaultPorts): Removed. * src/Request.cc (FeatureConfig.h): Included. (Request): Removed the statements related to defaultPorts. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead. A default port number is now retrieved from FeatureConfig. * src/main.cc (HaveEraseCommand.h): Included. (showVersion): Added the output of feature list. (main): Added HaveEraseCommand to command queue in BitTorrent downloading. * src/PeerInteractionCommand.h (chokeCheckPoint): Commented out. (periodicExecPoint): New variable. * src/PeerInteractionCommand.cc (executeInternal): Following methods are now called in at least every 0.5 seconds to reduce CPU usage: detectMessageFlooding(), peerInteraction->checkRequestSlot(), checkHave(), sendKeepAlive(). (checkLongTimePeerChoking): Commented out. * src/BitfieldMan.h (getNthBitIndex): Changed the method signature. (getMissingIndexRandomly): Changed the method signature. * src/BitfieldMan.cc (getNthBitIndex): Rewritten (getMissingIndexRandomly): Rewritten. (hasMissingPiece): Rewritten. (getMissingIndex): Refactored. (getMissingUnusedIndex); Refactored. (getMissingIndex): Refactored.
2006-07-30 12:58:27 +00:00
};
CPPUNIT_TEST_SUITE_REGISTRATION(FeatureConfigTest);
void FeatureConfigTest::testGetDefaultPort() {
CPPUNIT_ASSERT_EQUAL((uint16_t)80, getDefaultPort("http"));
CPPUNIT_ASSERT_EQUAL((uint16_t)443, getDefaultPort("https"));
CPPUNIT_ASSERT_EQUAL((uint16_t)21, getDefaultPort("ftp"));
CPPUNIT_ASSERT_EQUAL((uint16_t)22, getDefaultPort("sftp"));
2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> * src/TorrentMan.h: (advertisePiece): Updated doc. (getAdvertisedPieceIndexes): Updated doc. (removeAdvertisedPiece); New function. * src/TorrentMan.cc (FindElapsedHave): New function object. (removeAdvertisedPiece): New function. * src/HaveEraseCommand.h: New class. * src/HaveEraseCommand.cc: New class. * src/FeatureConfig.h: New class. * src/FeatureConfig.cc: New class. * src/Request.h (defaultPorts): Removed. * src/Request.cc (FeatureConfig.h): Included. (Request): Removed the statements related to defaultPorts. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead. A default port number is now retrieved from FeatureConfig. * src/main.cc (HaveEraseCommand.h): Included. (showVersion): Added the output of feature list. (main): Added HaveEraseCommand to command queue in BitTorrent downloading. * src/PeerInteractionCommand.h (chokeCheckPoint): Commented out. (periodicExecPoint): New variable. * src/PeerInteractionCommand.cc (executeInternal): Following methods are now called in at least every 0.5 seconds to reduce CPU usage: detectMessageFlooding(), peerInteraction->checkRequestSlot(), checkHave(), sendKeepAlive(). (checkLongTimePeerChoking): Commented out. * src/BitfieldMan.h (getNthBitIndex): Changed the method signature. (getMissingIndexRandomly): Changed the method signature. * src/BitfieldMan.cc (getNthBitIndex): Rewritten (getMissingIndexRandomly): Rewritten. (hasMissingPiece): Rewritten. (getMissingIndex): Refactored. (getMissingUnusedIndex); Refactored. (getMissingIndex): Refactored.
2006-07-30 12:58:27 +00:00
}
void FeatureConfigTest::testStrSupportedFeature() {
const char* https = strSupportedFeature(FEATURE_HTTPS);
2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> MessageDigestHelper is introduced in order to simplify the use of message digest. Removed repeated code. The message digest algorithm is now specified by string, like "sha1", "md5". * src/messageDigest.{h, cc} * src/MessageDigestHelper.{h, cc}: New class. * src/DefaultPieceStorage.cc * src/DefaultBtContext.{h, cc} (computeFastSet): New function. (setInfoHash): Added for unit testing. (setNumPieces): Added for unit testing. * src/DefaultBtInteractive.cc * src/BtPieceMessage.cc * src/Peer.cc * src/Checksum.h * src/message.h * src/IteratableChecksumValidator.h * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator inside it. * src/SegmentMan.{h, cc} (checkIntegrity): Removed. * src/IteratableChunkChecksumValidator.{h, cc} * src/Util.h (sha1Sum): Removed. (simpleMessageDigest): Removed. (fileChecksum): Removed. (computeFastSet): Removed. * src/ShaVisitor.cc * src/ChunkChecksum.h * src/DownloadCommand.cc Removed messageDigest virtual functions. * src/MultiDiskAdaptor.{h, cc} * src/DiskAdaptor.h * src/ByteArrayDiskWriter.h * src/DiskWriter.h * src/DiskAdaptorWriter.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/AbstractDiskWriter.{h, cc} Fixed comilation error when message digest is disabled. * src/MetalinkEntry.{h, cc} * src/MetalinkRequestInfo.cc Removed srandom and random. * src/SimpleRandomizer.h Added size() virtual function to DiskAdaptor * src/MultiDiskAdaptor.h Fixed the bug that causes that files are not opened correctly in multi-file torrent. * src/TorrentRequestInfo.cc * src/MultiDiskAdaptor.cc Added SHA256 support * src/messageDigest.cc * src/Xml2MetalinkProcessor.cc Show supported message digest algorithms * src/main.cc Updated contact info. * src/main.cc
2007-08-08 14:40:11 +00:00
#ifdef ENABLE_SSL
CPPUNIT_ASSERT(https);
2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> MessageDigestHelper is introduced in order to simplify the use of message digest. Removed repeated code. The message digest algorithm is now specified by string, like "sha1", "md5". * src/messageDigest.{h, cc} * src/MessageDigestHelper.{h, cc}: New class. * src/DefaultPieceStorage.cc * src/DefaultBtContext.{h, cc} (computeFastSet): New function. (setInfoHash): Added for unit testing. (setNumPieces): Added for unit testing. * src/DefaultBtInteractive.cc * src/BtPieceMessage.cc * src/Peer.cc * src/Checksum.h * src/message.h * src/IteratableChecksumValidator.h * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator inside it. * src/SegmentMan.{h, cc} (checkIntegrity): Removed. * src/IteratableChunkChecksumValidator.{h, cc} * src/Util.h (sha1Sum): Removed. (simpleMessageDigest): Removed. (fileChecksum): Removed. (computeFastSet): Removed. * src/ShaVisitor.cc * src/ChunkChecksum.h * src/DownloadCommand.cc Removed messageDigest virtual functions. * src/MultiDiskAdaptor.{h, cc} * src/DiskAdaptor.h * src/ByteArrayDiskWriter.h * src/DiskWriter.h * src/DiskAdaptorWriter.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/AbstractDiskWriter.{h, cc} Fixed comilation error when message digest is disabled. * src/MetalinkEntry.{h, cc} * src/MetalinkRequestInfo.cc Removed srandom and random. * src/SimpleRandomizer.h Added size() virtual function to DiskAdaptor * src/MultiDiskAdaptor.h Fixed the bug that causes that files are not opened correctly in multi-file torrent. * src/TorrentRequestInfo.cc * src/MultiDiskAdaptor.cc Added SHA256 support * src/messageDigest.cc * src/Xml2MetalinkProcessor.cc Show supported message digest algorithms * src/main.cc Updated contact info. * src/main.cc
2007-08-08 14:40:11 +00:00
#else
CPPUNIT_ASSERT(!https);
2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> MessageDigestHelper is introduced in order to simplify the use of message digest. Removed repeated code. The message digest algorithm is now specified by string, like "sha1", "md5". * src/messageDigest.{h, cc} * src/MessageDigestHelper.{h, cc}: New class. * src/DefaultPieceStorage.cc * src/DefaultBtContext.{h, cc} (computeFastSet): New function. (setInfoHash): Added for unit testing. (setNumPieces): Added for unit testing. * src/DefaultBtInteractive.cc * src/BtPieceMessage.cc * src/Peer.cc * src/Checksum.h * src/message.h * src/IteratableChecksumValidator.h * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator inside it. * src/SegmentMan.{h, cc} (checkIntegrity): Removed. * src/IteratableChunkChecksumValidator.{h, cc} * src/Util.h (sha1Sum): Removed. (simpleMessageDigest): Removed. (fileChecksum): Removed. (computeFastSet): Removed. * src/ShaVisitor.cc * src/ChunkChecksum.h * src/DownloadCommand.cc Removed messageDigest virtual functions. * src/MultiDiskAdaptor.{h, cc} * src/DiskAdaptor.h * src/ByteArrayDiskWriter.h * src/DiskWriter.h * src/DiskAdaptorWriter.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/AbstractDiskWriter.{h, cc} Fixed comilation error when message digest is disabled. * src/MetalinkEntry.{h, cc} * src/MetalinkRequestInfo.cc Removed srandom and random. * src/SimpleRandomizer.h Added size() virtual function to DiskAdaptor * src/MultiDiskAdaptor.h Fixed the bug that causes that files are not opened correctly in multi-file torrent. * src/TorrentRequestInfo.cc * src/MultiDiskAdaptor.cc Added SHA256 support * src/messageDigest.cc * src/Xml2MetalinkProcessor.cc Show supported message digest algorithms * src/main.cc Updated contact info. * src/main.cc
2007-08-08 14:40:11 +00:00
#endif // ENABLE_SSL
CPPUNIT_ASSERT(!strSupportedFeature(MAX_FEATURE));
auto sftp = strSupportedFeature(FEATURE_SFTP);
#ifdef HAVE_LIBSSH2
CPPUNIT_ASSERT(sftp);
#else // !HAVE_LIBSSH2
CPPUNIT_ASSERT(!sftp);
#endif // !HAVE_LIBSSH2
2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> * src/TorrentMan.h: (advertisePiece): Updated doc. (getAdvertisedPieceIndexes): Updated doc. (removeAdvertisedPiece); New function. * src/TorrentMan.cc (FindElapsedHave): New function object. (removeAdvertisedPiece): New function. * src/HaveEraseCommand.h: New class. * src/HaveEraseCommand.cc: New class. * src/FeatureConfig.h: New class. * src/FeatureConfig.cc: New class. * src/Request.h (defaultPorts): Removed. * src/Request.cc (FeatureConfig.h): Included. (Request): Removed the statements related to defaultPorts. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead. A default port number is now retrieved from FeatureConfig. * src/main.cc (HaveEraseCommand.h): Included. (showVersion): Added the output of feature list. (main): Added HaveEraseCommand to command queue in BitTorrent downloading. * src/PeerInteractionCommand.h (chokeCheckPoint): Commented out. (periodicExecPoint): New variable. * src/PeerInteractionCommand.cc (executeInternal): Following methods are now called in at least every 0.5 seconds to reduce CPU usage: detectMessageFlooding(), peerInteraction->checkRequestSlot(), checkHave(), sendKeepAlive(). (checkLongTimePeerChoking): Commented out. * src/BitfieldMan.h (getNthBitIndex): Changed the method signature. (getMissingIndexRandomly): Changed the method signature. * src/BitfieldMan.cc (getNthBitIndex): Rewritten (getMissingIndexRandomly): Rewritten. (hasMissingPiece): Rewritten. (getMissingIndex): Refactored. (getMissingUnusedIndex); Refactored. (getMissingIndex): Refactored.
2006-07-30 12:58:27 +00:00
}
void FeatureConfigTest::testFeatureSummary() {
const std::string features[] = {
#ifdef ENABLE_ASYNC_DNS
"Async DNS",
#endif // ENABLE_ASYNC_DNS
2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> MessageDigestHelper is introduced in order to simplify the use of message digest. Removed repeated code. The message digest algorithm is now specified by string, like "sha1", "md5". * src/messageDigest.{h, cc} * src/MessageDigestHelper.{h, cc}: New class. * src/DefaultPieceStorage.cc * src/DefaultBtContext.{h, cc} (computeFastSet): New function. (setInfoHash): Added for unit testing. (setNumPieces): Added for unit testing. * src/DefaultBtInteractive.cc * src/BtPieceMessage.cc * src/Peer.cc * src/Checksum.h * src/message.h * src/IteratableChecksumValidator.h * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator inside it. * src/SegmentMan.{h, cc} (checkIntegrity): Removed. * src/IteratableChunkChecksumValidator.{h, cc} * src/Util.h (sha1Sum): Removed. (simpleMessageDigest): Removed. (fileChecksum): Removed. (computeFastSet): Removed. * src/ShaVisitor.cc * src/ChunkChecksum.h * src/DownloadCommand.cc Removed messageDigest virtual functions. * src/MultiDiskAdaptor.{h, cc} * src/DiskAdaptor.h * src/ByteArrayDiskWriter.h * src/DiskWriter.h * src/DiskAdaptorWriter.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/AbstractDiskWriter.{h, cc} Fixed comilation error when message digest is disabled. * src/MetalinkEntry.{h, cc} * src/MetalinkRequestInfo.cc Removed srandom and random. * src/SimpleRandomizer.h Added size() virtual function to DiskAdaptor * src/MultiDiskAdaptor.h Fixed the bug that causes that files are not opened correctly in multi-file torrent. * src/TorrentRequestInfo.cc * src/MultiDiskAdaptor.cc Added SHA256 support * src/messageDigest.cc * src/Xml2MetalinkProcessor.cc Show supported message digest algorithms * src/main.cc Updated contact info. * src/main.cc
2007-08-08 14:40:11 +00:00
#ifdef ENABLE_BITTORRENT
"BitTorrent",
2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> MessageDigestHelper is introduced in order to simplify the use of message digest. Removed repeated code. The message digest algorithm is now specified by string, like "sha1", "md5". * src/messageDigest.{h, cc} * src/MessageDigestHelper.{h, cc}: New class. * src/DefaultPieceStorage.cc * src/DefaultBtContext.{h, cc} (computeFastSet): New function. (setInfoHash): Added for unit testing. (setNumPieces): Added for unit testing. * src/DefaultBtInteractive.cc * src/BtPieceMessage.cc * src/Peer.cc * src/Checksum.h * src/message.h * src/IteratableChecksumValidator.h * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator inside it. * src/SegmentMan.{h, cc} (checkIntegrity): Removed. * src/IteratableChunkChecksumValidator.{h, cc} * src/Util.h (sha1Sum): Removed. (simpleMessageDigest): Removed. (fileChecksum): Removed. (computeFastSet): Removed. * src/ShaVisitor.cc * src/ChunkChecksum.h * src/DownloadCommand.cc Removed messageDigest virtual functions. * src/MultiDiskAdaptor.{h, cc} * src/DiskAdaptor.h * src/ByteArrayDiskWriter.h * src/DiskWriter.h * src/DiskAdaptorWriter.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/AbstractDiskWriter.{h, cc} Fixed comilation error when message digest is disabled. * src/MetalinkEntry.{h, cc} * src/MetalinkRequestInfo.cc Removed srandom and random. * src/SimpleRandomizer.h Added size() virtual function to DiskAdaptor * src/MultiDiskAdaptor.h Fixed the bug that causes that files are not opened correctly in multi-file torrent. * src/TorrentRequestInfo.cc * src/MultiDiskAdaptor.cc Added SHA256 support * src/messageDigest.cc * src/Xml2MetalinkProcessor.cc Show supported message digest algorithms * src/main.cc Updated contact info. * src/main.cc
2007-08-08 14:40:11 +00:00
#endif // ENABLE_BITTORRENT
#ifdef HAVE_SQLITE3
"Firefox3 Cookie",
#endif // HAVE_SQLITE3
2011-02-18 13:34:38 +00:00
#ifdef HAVE_ZLIB
"GZip",
2011-02-18 13:34:38 +00:00
#endif // HAVE_ZLIB
#ifdef ENABLE_SSL
"HTTPS",
#endif // ENABLE_SSL
"Message Digest",
#ifdef ENABLE_METALINK
"Metalink",
#endif // ENABLE_METALINK
#ifdef ENABLE_XML_RPC
"XML-RPC",
#endif // ENABLE_XML_RPC
#ifdef HAVE_LIBSSH2
"SFTP",
#endif // HAVE_LIBSSH2
};
std::string featuresString = strjoin(std::begin(features),
std::end(features), ", ");
CPPUNIT_ASSERT_EQUAL(featuresString, featureSummary());
2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> * src/TorrentMan.h: (advertisePiece): Updated doc. (getAdvertisedPieceIndexes): Updated doc. (removeAdvertisedPiece); New function. * src/TorrentMan.cc (FindElapsedHave): New function object. (removeAdvertisedPiece): New function. * src/HaveEraseCommand.h: New class. * src/HaveEraseCommand.cc: New class. * src/FeatureConfig.h: New class. * src/FeatureConfig.cc: New class. * src/Request.h (defaultPorts): Removed. * src/Request.cc (FeatureConfig.h): Included. (Request): Removed the statements related to defaultPorts. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead. A default port number is now retrieved from FeatureConfig. * src/main.cc (HaveEraseCommand.h): Included. (showVersion): Added the output of feature list. (main): Added HaveEraseCommand to command queue in BitTorrent downloading. * src/PeerInteractionCommand.h (chokeCheckPoint): Commented out. (periodicExecPoint): New variable. * src/PeerInteractionCommand.cc (executeInternal): Following methods are now called in at least every 0.5 seconds to reduce CPU usage: detectMessageFlooding(), peerInteraction->checkRequestSlot(), checkHave(), sendKeepAlive(). (checkLongTimePeerChoking): Commented out. * src/BitfieldMan.h (getNthBitIndex): Changed the method signature. (getMissingIndexRandomly): Changed the method signature. * src/BitfieldMan.cc (getNthBitIndex): Rewritten (getMissingIndexRandomly): Rewritten. (hasMissingPiece): Rewritten. (getMissingIndex): Refactored. (getMissingUnusedIndex); Refactored. (getMissingIndex): Refactored.
2006-07-30 12:58:27 +00:00
}
} // namespace aria2