/* */ #ifndef HTTP_REQUEST_CONNECT_CHAIN_H #define HTTP_REQUEST_CONNECT_CHAIN_H #include "ControlChain.h" #include "ConnectCommand.h" #include "DownloadEngine.h" #include "SocketRecvBuffer.h" #include "HttpConnection.h" #include "HttpRequestCommand.h" namespace aria2 { struct HttpRequestConnectChain : public ControlChain { HttpRequestConnectChain() {} virtual ~HttpRequestConnectChain() {} virtual int run(ConnectCommand* t, DownloadEngine* e) CXX11_OVERRIDE { auto b = std::make_shared(t->getSocket()); auto k = std::make_shared(t->getCuid(), t->getSocket(), b); auto c = make_unique( t->getCuid(), t->getRequest(), t->getFileEntry(), t->getRequestGroup(), k, e, t->getSocket()); c->setProxyRequest(t->getProxyRequest()); c->setStatus(Command::STATUS_ONESHOT_REALTIME); e->setNoWait(true); e->addCommand(std::move(c)); return 0; } }; } // namespace aria2 #endif // HTTP_REQUEST_CONNECT_CHAIN_H