summaryrefslogtreecommitdiff
path: root/src/DownloadEngine.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-05-21 13:54:50 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-05-21 13:54:50 +0000
commit92f84f71f575fe4548f4a43575fbf49ce7d50d26 (patch)
tree12148ce1e8515acff763602aa0b99f89172bdf33 /src/DownloadEngine.h
parent47adbe618c85b437220588fa1f7d602e113f7875 (diff)
2010-05-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that connection pooling does not take into account proxy. This means that when connection A via proxy X is pooled, it will be wrongly reused in the download using proxy Y. * src/DownloadEngine.cc * src/DownloadEngine.h * src/FtpFinishDownloadCommand.cc * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc * src/HttpDownloadCommand.cc * src/HttpInitiateConnectionCommand.cc * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc
Diffstat (limited to 'src/DownloadEngine.h')
-rw-r--r--src/DownloadEngine.h44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/DownloadEngine.h b/src/DownloadEngine.h
index 14da2b90..3a15a81e 100644
--- a/src/DownloadEngine.h
+++ b/src/DownloadEngine.h
@@ -150,22 +150,10 @@ private:
void afterEachIteration();
- void poolSocket(const std::string& ipaddr,
- uint16_t port,
- const SocketPoolEntry& entry);
-
- void poolSocket(const std::string& ipaddr, uint16_t port,
- const std::string& username,
- const SharedHandle<SocketCore>& sock,
- const std::map<std::string, std::string>& options,
- time_t timeout);
-
- void poolSocket(const std::string& ipaddr, uint16_t port,
- const SharedHandle<SocketCore>& sock,
- time_t timeout);
+ void poolSocket(const std::string& key, const SocketPoolEntry& entry);
std::multimap<std::string, SocketPoolEntry>::iterator
- findSocketPoolEntry(const std::string& ipaddr, uint16_t port);
+ findSocketPoolEntry(const std::string& key);
public:
std::deque<Command*> commands;
SharedHandle<RequestGroupMan> _requestGroupMan;
@@ -215,29 +203,45 @@ public:
void addRoutineCommand(Command* command);
+ void poolSocket(const std::string& ipaddr, uint16_t port,
+ const std::string& username,
+ const std::string& proxyhost, uint16_t proxyport,
+ const SharedHandle<SocketCore>& sock,
+ const std::map<std::string, std::string>& options,
+ time_t timeout);
+
void poolSocket(const SharedHandle<Request>& request,
- bool proxyDefined,
const std::string& username,
+ const SharedHandle<Request>& proxyRequest,
const SharedHandle<SocketCore>& socket,
const std::map<std::string, std::string>& options,
time_t timeout = 15);
+ void poolSocket(const std::string& ipaddr, uint16_t port,
+ const std::string& proxyhost, uint16_t proxyport,
+ const SharedHandle<SocketCore>& sock,
+ time_t timeout);
+
void poolSocket(const SharedHandle<Request>& request,
- bool proxyDefined,
+ const SharedHandle<Request>& proxyRequest,
const SharedHandle<SocketCore>& socket,
time_t timeout = 15);
- SharedHandle<SocketCore> popPooledSocket(const std::string& ipaddr,
- uint16_t port);
+ SharedHandle<SocketCore> popPooledSocket
+ (const std::string& ipaddr,
+ uint16_t port,
+ const std::string& proxyhost, uint16_t proxyport);
SharedHandle<SocketCore> popPooledSocket
(std::map<std::string, std::string>& options,
const std::string& ipaddr,
uint16_t port,
- const std::string& username);
+ const std::string& username,
+ const std::string& proxyhost, uint16_t proxyport);
SharedHandle<SocketCore>
- popPooledSocket(const std::vector<std::string>& ipaddrs, uint16_t port);
+ popPooledSocket
+ (const std::vector<std::string>& ipaddrs, uint16_t port);
SharedHandle<SocketCore>
popPooledSocket