From d52bce74d3a40d75dcfa3496e67abbed9f1fcba8 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 8 May 2008 11:18:36 +0000 Subject: 2008-05-08 Tatsuhiro Tsujikawa Rewritten name resolver. Now async DNS can be disabled by --async-dns option. The asynchronous DNS is not capable of IPv6 yet. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at least for HTTP download. * src/AbstractCommand.cc * src/AbstractCommand.h * src/AsyncNameResolver.cc * src/AsyncNameResolver.h * src/DHTEntryPointNameResolveCommand.cc * src/DHTEntryPointNameResolveCommand.h * src/DownloadEngine.cc * src/DownloadEngine.h * src/FtpInitiateConnectionCommand.cc * src/FtpInitiateConnectionCommand.h * src/HelpItemFactory.cc * src/HttpInitiateConnectionCommand.cc * src/HttpInitiateConnectionCommand.h * src/InitiateConnectionCommand.cc * src/InitiateConnectionCommand.h * src/Makefile.am * src/Makefile.in * src/NameResolver.cc * src/NameResolver.h * src/OptionHandlerFactory.cc * src/SocketCore.cc * src/SocketCore.h * src/Util.cc * src/Util.h * src/option_processing.cc * src/prefs.h * src/usage_text.h --- src/HttpInitiateConnectionCommand.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'src/HttpInitiateConnectionCommand.h') diff --git a/src/HttpInitiateConnectionCommand.h b/src/HttpInitiateConnectionCommand.h index b9579c38..c737c6cc 100644 --- a/src/HttpInitiateConnectionCommand.h +++ b/src/HttpInitiateConnectionCommand.h @@ -35,29 +35,17 @@ #ifndef _D_HTTP_INITIATE_CONNECTION_COMMAND_H_ #define _D_HTTP_INITIATE_CONNECTION_COMMAND_H_ -#include "AbstractCommand.h" +#include "InitiateConnectionCommand.h" namespace aria2 { -class HttpInitiateConnectionCommand : public AbstractCommand { +class HttpInitiateConnectionCommand : public InitiateConnectionCommand { private: - SharedHandle nameResolver; - bool useProxy(); - bool useProxyGet(); - bool useProxyTunnel(); + bool useProxyGet() const; + bool useProxyTunnel() const; protected: - /** - * Connect to the server. - * This method just send connection request to the server. - * Using nonblocking mode of socket, this funtion returns immediately - * after send connection packet to the server. - * Whether or not the connection is established successfully is - * evaluated by RequestCommand. - */ - virtual bool executeInternal(); -#ifdef ENABLE_ASYNC_DNS - virtual bool nameResolveFinished() const; -#endif // ENABLE_ASYNC_DNS + virtual Command* createNextCommand + (const std::deque& resolvedAddresses); public: HttpInitiateConnectionCommand(int cuid, const SharedHandle& req, RequestGroup* requestGroup, -- cgit