9#include <userver/logging/fwd.hpp>
10#include <userver/server/request/response_base.hpp>
12USERVER_NAMESPACE_BEGIN
24 virtual ~RequestBase();
26 virtual bool IsFinal()
const = 0;
27 virtual bool IsUpgradeWebsocket()
const = 0;
28 virtual void DoUpgrade(std::unique_ptr<engine::io::RwBase>&& socket, engine::
io::Sockaddr&& peer_name)
const = 0;
32 virtual void WriteAccessLogs(
33 const logging::LoggerPtr& logger_access,
34 const logging::LoggerPtr& logger_access_tskv,
35 const std::string& remote_address
38 virtual const std::string& GetRequestPath()
const = 0;
40 void SetTaskCreateTime();
41 void SetTaskStartTime();
42 void SetResponseNotifyTime();
43 void SetResponseNotifyTime(std::chrono::steady_clock::time_point now);
44 void SetStartSendResponseTime();
45 void SetFinishSendResponseTime();
47 virtual void SetMatchedPathLength(size_t length) = 0;
49 std::chrono::steady_clock::time_point StartTime()
const {
return start_time_; }
51 virtual void MarkAsInternalServerError()
const = 0;
53 virtual void AccountResponseTime() = 0;
57 std::chrono::steady_clock::time_point start_time_;
59 std::chrono::steady_clock::time_point task_create_time_;
61 std::chrono::steady_clock::time_point task_start_time_;
63 std::chrono::steady_clock::time_point response_notify_time_;
65 std::chrono::steady_clock::time_point start_send_response_time_;
67 std::chrono::steady_clock::time_point finish_send_response_time_;