summaryrefslogtreecommitdiff
path: root/src/AbstractCommand.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-07-17 03:23:56 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-07-17 03:23:56 +0000
commitd0b727f6dc7131ea5c478bcfdff3b0408f2b26f3 (patch)
treef501ae4dfa91fd00a28076c762dc67d4dea6cb17 /src/AbstractCommand.h
parent036abeee1182ccac0c80351d7d7dd3cbac7ae3ac (diff)
2010-07-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Count the number of command used in HTTP(S)/FTP and the number of connections in HTTP(S)/FTP independently. The former is used to determin whether additional command is needed. The latter is used to report user to how many connections are used in a download. * src/AbstractCommand.cc * src/AbstractCommand.h * src/CreateRequestCommand.cc * src/RequestGroup.cc * src/RequestGroup.h
Diffstat (limited to 'src/AbstractCommand.h')
-rw-r--r--src/AbstractCommand.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/AbstractCommand.h b/src/AbstractCommand.h
index 619e6af7..8dd5a15b 100644
--- a/src/AbstractCommand.h
+++ b/src/AbstractCommand.h
@@ -75,6 +75,8 @@ private:
SharedHandle<SocketCore> writeCheckTarget_;
bool nameResolverCheck_;
+ bool incNumConnection_;
+
#ifdef ENABLE_ASYNC_DNS
void setNameResolverCheck(const SharedHandle<AsyncNameResolver>& resolver);
@@ -218,10 +220,12 @@ protected:
return requestGroup_->getPieceStorage();
}
public:
- AbstractCommand(cuid_t cuid, const SharedHandle<Request>& req,
- const SharedHandle<FileEntry>& fileEntry,
- RequestGroup* requestGroup, DownloadEngine* e,
- const SharedHandle<SocketCore>& s = SharedHandle<SocketCore>());
+ AbstractCommand
+ (cuid_t cuid, const SharedHandle<Request>& req,
+ const SharedHandle<FileEntry>& fileEntry,
+ RequestGroup* requestGroup, DownloadEngine* e,
+ const SharedHandle<SocketCore>& s = SharedHandle<SocketCore>(),
+ bool incNumConnection = true);
virtual ~AbstractCommand();
bool execute();