diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-05-20 13:51:52 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-05-20 13:51:52 +0000 |
| commit | eaf2d53a91d4019683bc6caf25c5a143f88a84b4 (patch) | |
| tree | 91137d789cdaa42221017a52346befb406c3addf /src/HttpInitiateConnectionCommand.cc | |
| parent | dd37b7be0aa5d818636530bc60f894893fd8f7a4 (diff) | |
2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Added the simultaneous download feature.
Diffstat (limited to 'src/HttpInitiateConnectionCommand.cc')
| -rw-r--r-- | src/HttpInitiateConnectionCommand.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/HttpInitiateConnectionCommand.cc b/src/HttpInitiateConnectionCommand.cc index 93e2df4d..707ff73e 100644 --- a/src/HttpInitiateConnectionCommand.cc +++ b/src/HttpInitiateConnectionCommand.cc @@ -43,10 +43,12 @@ HttpInitiateConnectionCommand::HttpInitiateConnectionCommand(int cuid, const RequestHandle& req, + RequestGroup* requestGroup, DownloadEngine* e): - AbstractCommand(cuid, req, e) + AbstractCommand(cuid, req, requestGroup, e) { setTimeout(e->option->getAsInt(PREF_DNS_TIMEOUT)); + setStatusActive(); disableReadCheckSocket(); disableWriteCheckSocket(); } @@ -80,9 +82,9 @@ bool HttpInitiateConnectionCommand::executeInternal() { socket->establishConnection(hostname, e->option->getAsInt(PREF_HTTP_PROXY_PORT)); if(useProxyTunnel()) { - command = new HttpProxyRequestCommand(cuid, req, e, socket); + command = new HttpProxyRequestCommand(cuid, req, _requestGroup, e, socket); } else if(useProxyGet()) { - command = new HttpRequestCommand(cuid, req, e, socket); + command = new HttpRequestCommand(cuid, req, _requestGroup, e, socket); } else { // TODO throw new DlAbortEx("ERROR"); @@ -91,7 +93,7 @@ bool HttpInitiateConnectionCommand::executeInternal() { logger->info(MSG_CONNECTING_TO_SERVER, cuid, req->getHost().c_str(), req->getPort()); socket->establishConnection(hostname, req->getPort()); - command = new HttpRequestCommand(cuid, req, e, socket); + command = new HttpRequestCommand(cuid, req, _requestGroup, e, socket); } e->commands.push_back(command); return true; |
