15#ifndef PKG_RPC_RPC_DETAIL_THREAD_HTTP_SERVER_H_
16#define PKG_RPC_RPC_DETAIL_THREAD_HTTP_SERVER_H_
30class cThreadedHttpServer {
32 cThreadedHttpServer();
33 ~cThreadedHttpServer();
34 cThreadedHttpServer(
const cThreadedHttpServer&) =
delete;
35 cThreadedHttpServer& operator=(
const cThreadedHttpServer&) =
delete;
36 cThreadedHttpServer(cThreadedHttpServer&&) =
default;
37 cThreadedHttpServer& operator=(cThreadedHttpServer&&) =
default;
44 a_util::result::Result StartListening(
const char* strURL,
int reuse = 1);
50 a_util::result::Result StopListening();
53 virtual bool HandleRequest(
const std::string& strUrl,
54 const std::string& strRequest,
55 std::string& strResponse,
56 std::string& strContentType) = 0;
59 const std::string& method;
60 const std::string& url;
61 const std::multimap<std::string, std::string>& headers;
62 const std::string& body;
63 const std::map<std::string, std::string>& params;
68 std::multimap<std::string, std::string>& headers;
72 virtual bool HandleRequest(
const tRequest& sRequest, tResponse& sResponse);
75 class cImplementation;
76 std::unique_ptr<cImplementation> m_pImplementation;
definition of the http namespace
Definition http_rpc_server.h:23
definition of the rpc namespace
Definition json_rpc_impl.h:20