33 bool enable_multithreading =
true,
34 size_t num_threads = std::thread::hardware_concurrency());
54 -> std::optional<std::string>;
84 static auto ParseAndValidateJson(
const std::string &request_str)
85 -> std::optional<nlohmann::json>;
98 auto DispatchSingleRequest(
const nlohmann::json &request_json)
99 -> std::optional<std::string>;
112 auto DispatchSingleRequestInner(
const nlohmann::json &request_json)
113 -> std::optional<nlohmann::json>;
126 auto DispatchBatchRequest(
const nlohmann::json &request_json)
127 -> std::optional<std::string>;
139 auto DispatchBatchRequestInner(
const nlohmann::json &request_json)
140 -> std::vector<nlohmann::json>;
152 static auto ValidateRequest(
const nlohmann::json &request_json)
153 -> std::optional<Response>;
165 static auto FindHandler(
166 const std::unordered_map<std::string, Handler> &handlers,
167 const std::string &method) -> std::optional<Handler>;
181 static auto HandleRequest(
const Request &request,
const Handler &handler)
182 -> std::optional<nlohmann::json>;
193 static auto HandleMethodCall(
205 static void HandleNotification(
209 std::unordered_map<std::string, Handler> handlers_;
212 bool enable_multithreading_;
215 BS::thread_pool thread_pool_;