/* */ #ifndef D_HTTP_SERVER_BODY_COMMAND_H #define D_HTTP_SERVER_BODY_COMMAND_H #include "Command.h" #include #include "TimerA2.h" #include "ValueBase.h" #include "RpcResponse.h" namespace aria2 { class DownloadEngine; class SocketCore; class HttpServer; class HttpServerBodyCommand : public Command { private: DownloadEngine* e_; std::shared_ptr socket_; std::shared_ptr httpServer_; Timer timeoutTimer_; bool writeCheck_; void sendJsonRpcResponse (const rpc::RpcResponse& res, const std::string& callback); void sendJsonRpcBatchResponse (const std::vector& results, const std::string& callback); void addHttpServerResponseCommand(bool delayed); void updateWriteCheck(); public: HttpServerBodyCommand(cuid_t cuid, const std::shared_ptr& httpServer, DownloadEngine* e, const std::shared_ptr& socket); virtual ~HttpServerBodyCommand(); virtual bool execute() CXX11_OVERRIDE; }; } // namespace aria2 #endif // D_HTTP_SERVER_BODY_COMMAND_H