mirror of https://github.com/aria2/aria2
f2d4faad08
To add asynchronous DNS support(libares): * src/AbstractCommand.h (setNameResolverCheck): New function. (disableNameResolverCheck): New function (resolveHostname): New function. * src/AbstractCommand.cc (setNameResolverCheck): New function. (disableNameResolverCheck): New function (resolveHostname): New function. * src/FtpInitiateConnectionCommand.h (nameResolver): New function. * src/FtpInitiateConnectionCommand.cc (Util.h): Included. (FtpInitiateConnectionCommand): Call disableReadCheckSocket, disableWriteCheckSocket. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck. (executeInternal): Added async DNS support. * src/HttpInitiateConnectionCommand.h (nameResolver): New function. * src/HttpInitiateConnectionCommand.cc (DlRetryEx.h): Included. (HttpInitiateConnectionCommand): Call disableReadCheckSocket, disableWriteCheckSocket. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck. (executeInternal): Added async DNS support. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded by extern "C" declaration. * src/NameResolver.cc: New class. * src/Util.h: (isNumberAndDotsNotation): New function * src/Util.cc (isNumberAndDotsNotation): New function. * src/DownloadEngine.h (NameResolver.h): Included. (NameResolverEntry): New class. (NameResolverEntries): New type definition. (addNameResolverCheck): New function. (deleteNameResolverCheck): New function. * src/DownloadEngine.cc (run): Initialize cp with 0. (SetDescriptor::operator()): Added for NameResolverEntry. (AccumulateActiveUuid::operator()): Added for NameResolverEntry. (waitData): Check nameResolver entries. (updateFdSet): Update fds in nameResolver entries. (addNameResolverCheck): New function. (deleteNameResolverCheck): new function. * src/PeerInteractionCommand.cc (executeInternal): Fixed wrong socket handling. * src/main.cc (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0. * src/Util.cc (fileChecksum): Removed the call to ctx.digestReset(). |
||
---|---|---|
.. | ||
4096chunk.txt | ||
AllTest.cc | ||
AllowedFastMessageTest.cc | ||
Base64Test.cc | ||
BitfieldManTest.cc | ||
BitfieldMessageTest.cc | ||
CancelMessageTest.cc | ||
ChokeMessageTest.cc | ||
ChunkedEncodingTest.cc | ||
CookieBoxTest.cc | ||
DataTest.cc | ||
DefaultDiskWriterTest.cc | ||
DictionaryTest.cc | ||
FeatureConfigTest.cc | ||
FileTest.cc | ||
HaveAllMessageTest.cc | ||
HaveMessageTest.cc | ||
HaveNoneMessageTest.cc | ||
InterestedMessageTest.cc | ||
ListTest.cc | ||
Makefile.am | ||
Makefile.in | ||
MetaFileUtilTest.cc | ||
MetalinkEntryTest.cc | ||
MetalinkerTest.cc | ||
MultiDiskWriterTest.cc | ||
NotInterestedMessageTest.cc | ||
OptionTest.cc | ||
PeerMessageUtilTest.cc | ||
PieceMessageTest.cc | ||
RejectMessageTest.cc | ||
RequestMessageTest.cc | ||
RequestTest.cc | ||
RequestToString.cc | ||
ShaVisitorTest.cc | ||
SuggestPieceMessageTest.cc | ||
TorrentManTest.cc | ||
UnchokeMessageTest.cc | ||
UtilTest.cc | ||
Xml2MetalinkProcessorTest.cc | ||
file1r.txt | ||
file2r.txt | ||
file3r.txt | ||
test.torrent | ||
test.xml |