summaryrefslogtreecommitdiff
path: root/src/InitiateConnectionCommand.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-04-01 23:51:33 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-04-01 23:51:33 +0900
commit26972b85359a4ab1f00545c9082a6c1b7d5a2593 (patch)
tree37c4d9c264e6281424137af235d0cef74b448bdb /src/InitiateConnectionCommand.h
parentcf23e3e11dfc7abfd4b95c5ce200404113cbe8e8 (diff)
Rewrite backup connection handling
Now dedicated ConnectCommand handles connection establishment. It checks whether connection is established or not. It also handles backup connection. The next Command creation is abstracted using ControlChain struct template.
Diffstat (limited to 'src/InitiateConnectionCommand.h')
-rw-r--r--src/InitiateConnectionCommand.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/InitiateConnectionCommand.h b/src/InitiateConnectionCommand.h
index 374de527..def24b0a 100644
--- a/src/InitiateConnectionCommand.h
+++ b/src/InitiateConnectionCommand.h
@@ -40,6 +40,7 @@
namespace aria2 {
class BackupConnectInfo;
+class ConnectCommand;
class InitiateConnectionCommand : public AbstractCommand {
protected:
@@ -70,6 +71,10 @@ protected:
SharedHandle<BackupConnectInfo> createBackupIPv4ConnectCommand
(const std::string& hostname, const std::string& ipaddr, uint16_t port,
Command* mainCommand);
+
+ void setupBackupConnection
+ (const std::string& hostname, const std::string& addr, uint16_t port,
+ ConnectCommand* c);
public:
InitiateConnectionCommand(cuid_t cuid, const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,