/* */ #ifndef D_HTTP_REQUEST_COMMAND_H #define D_HTTP_REQUEST_COMMAND_H #include "AbstractCommand.h" namespace aria2 { class HttpConnection; class SocketCore; // HttpRequestCommand sends HTTP request header to remote server. // Because network I/O is non-blocking, execute() returns false if all // headers have not been sent. Subsequent calls of execute() send // remaining header and when all headers are completely sent, // execute() creates next Command object, HttpResponseCommand, and // returns true. class HttpRequestCommand : public AbstractCommand { private: std::shared_ptr proxyRequest_; std::shared_ptr httpConnection_; protected: virtual bool executeInternal() CXX11_OVERRIDE; public: HttpRequestCommand(cuid_t cuid, const std::shared_ptr& req, const std::shared_ptr& fileEntry, RequestGroup* requestGroup, const std::shared_ptr& httpConnection, DownloadEngine* e, const std::shared_ptr& s); virtual ~HttpRequestCommand(); void setProxyRequest(const std::shared_ptr& proxyRequest); }; } // namespace aria2 #endif // D_HTTP_REQUEST_COMMAND_H