/* */ #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: SharedHandle proxyRequest_; SharedHandle httpConnection_; protected: virtual bool executeInternal(); public: HttpRequestCommand(cuid_t cuid, const SharedHandle& req, const SharedHandle& fileEntry, RequestGroup* requestGroup, const SharedHandle& httpConnection, DownloadEngine* e, const SharedHandle& s); virtual ~HttpRequestCommand(); void setProxyRequest(const SharedHandle& proxyRequest); }; } // namespace aria2 #endif // D_HTTP_REQUEST_COMMAND_H