From e0aa767f9428eb34a7ab7c1169c1ecc55262dade Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 21 Feb 2006 12:28:42 +0000 Subject: --- src/FtpTunnelRequestCommand.cc | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/FtpTunnelRequestCommand.cc (limited to 'src/FtpTunnelRequestCommand.cc') diff --git a/src/FtpTunnelRequestCommand.cc b/src/FtpTunnelRequestCommand.cc new file mode 100644 index 00000000..f103f7ce --- /dev/null +++ b/src/FtpTunnelRequestCommand.cc @@ -0,0 +1,41 @@ +/* */ +#include "FtpTunnelRequestCommand.h" +#include "FtpTunnelResponseCommand.h" +#include "HttpConnection.h" + +FtpTunnelRequestCommand::FtpTunnelRequestCommand(int cuid, Request* req, DownloadEngine* e, Socket* s):AbstractCommand(cuid, req, e, s) { + setReadCheckSocket(NULL); + setWriteCheckSocket(NULL); +} + +FtpTunnelRequestCommand::~FtpTunnelRequestCommand() {} + +bool FtpTunnelRequestCommand::executeInternal(Segment segment) { + socket->setBlockingMode(); + HttpConnection httpConnection(cuid, socket, req, e->option, e->logger); + httpConnection.sendProxyRequest(); + + FtpTunnelResponseCommand* command = new FtpTunnelResponseCommand(cuid, req, e, socket); + e->commands.push(command); + return true; +} -- cgit