diff --git a/src/CreateRequestCommand.h b/src/CreateRequestCommand.h index 5248e1c7..6701f92b 100644 --- a/src/CreateRequestCommand.h +++ b/src/CreateRequestCommand.h @@ -39,6 +39,12 @@ namespace aria2 { +// CreateRequestCommand selects URI using URISelector object and +// create Request object with the selected URI. Then create subsequent +// command using +// InitiateConnectionCommandFactory. InitiateConnectionCommandFactory +// creates Command based on the protocol of selected URI. If there is +// no URI available, then throws exceptions. class CreateRequestCommand:public AbstractCommand { public: CreateRequestCommand(cuid_t cuid, diff --git a/src/HttpInitiateConnectionCommand.h b/src/HttpInitiateConnectionCommand.h index 0b1d1e1d..0d732aee 100644 --- a/src/HttpInitiateConnectionCommand.h +++ b/src/HttpInitiateConnectionCommand.h @@ -39,6 +39,27 @@ namespace aria2 { +// HttpInitiateConnectionCommand determins remote host to connect and +// resolves IP address from that hostname and creates subsequent +// command. Usually, remote host is the host in URI. If proxy is +// used, remote host becomes proxy server. This command searches +// pooled socket using resolved IP addresses and use pooled socket if +// available. The following chart shows what Command is followed +// after this command based on conditions. +// +// HttpInitiateConnectionCommand +// | +// | proxy is used? +// +----------------+ +// | | +// | | pooled socket? +// | +------------> HttpRequestCommand +// | | tunnel? +// | +------------> HttpProxyRequestCommand +// | | otherwise +// | +------------> HttpRequestCommand +// | direct connection +// +-----------------------------> HttpRequestCommand class HttpInitiateConnectionCommand : public InitiateConnectionCommand { protected: virtual Command* createNextCommand