diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-07-02 15:18:13 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-07-02 15:18:13 +0000 |
| commit | 01fdb2aaeb4dcb351931c14ca63d9347f0adc529 (patch) | |
| tree | 94f6e4a327c77b358316d5790224d9cccee8e3c1 /src/AbstractCommand.h | |
| parent | 8796993c71c8a326c2f261c01db5066cfc3b2848 (diff) | |
2009-07-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Try all available addresses returned by DNS until it gets
connected in HTTP(S)/FTP download
* src/AbstractCommand.cc
* src/AbstractCommand.h
* src/AbstractProxyRequestCommand.cc
* src/AbstractProxyRequestCommand.h
* src/DNSCache.h
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/FtpInitiateConnectionCommand.cc
* src/FtpInitiateConnectionCommand.h
* src/FtpNegotiationCommand.cc
* src/FtpNegotiationCommand.h
* src/HttpInitiateConnectionCommand.cc
* src/HttpInitiateConnectionCommand.h
* src/HttpRequestCommand.cc
* src/HttpRequestCommand.h
* src/InitiateConnectionCommand.cc
* src/InitiateConnectionCommand.h
* test/DNSCacheTest.cc
* test/Makefile.am
* test/SimpleDNSCacheTest.cc
Diffstat (limited to 'src/AbstractCommand.h')
| -rw-r--r-- | src/AbstractCommand.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/AbstractCommand.h b/src/AbstractCommand.h index 680f3711..1d6d5379 100644 --- a/src/AbstractCommand.h +++ b/src/AbstractCommand.h @@ -102,7 +102,16 @@ protected: void prepareForNextAction(Command* nextCommand = 0); - void checkIfConnectionEstablished(const SharedHandle<SocketCore>& socket); + // Check if socket is connected. If socket is not connected and + // there are other addresses to try, command is created using + // InitiateConnectionCommandFactory and it is pushed to + // DownloadEngine and returns false. If no addresses left, DlRetryEx + // exception is thrown. + bool checkIfConnectionEstablished + (const SharedHandle<SocketCore>& socket, + const std::string& connectedHostname, + const std::string& connectedAddr, + uint16_t connectedPort); /* * Returns true if proxy for the procol indicated by Request::getProtocol() |
