/* */ #include "HttpDownloadCommand.h" #include "HttpRequestCommand.h" #include "Util.h" #include "message.h" HttpDownloadCommand::HttpDownloadCommand(int cuid, const RequestHandle req, DownloadEngine* e, const SocketHandle& socket) :DownloadCommand(cuid, req, e, socket) {} HttpDownloadCommand::~HttpDownloadCommand() {} bool HttpDownloadCommand::prepareForNextSegment() { if(e->segmentMan->finished()) { return true; } else { if(req->isKeepAlive()) { Command* command = new HttpRequestCommand(cuid, req, e, socket); e->commands.push_back(command); return true; } else { return DownloadCommand::prepareForNextSegment(); } } }