Loading asio_compatibility.hpp +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,10 @@ namespace SimpleWeb { using resolver_results = asio::ip::tcp::resolver::results_type; using async_connect_endpoint = asio::ip::tcp::endpoint; template <typename handler_type> inline void post(io_context &context, handler_type &&handler) { asio::post(context, std::forward<handler_type>(handler)); } inline void restart(io_context &context) noexcept { context.restart(); } Loading @@ -51,6 +55,10 @@ namespace SimpleWeb { using resolver_results = asio::ip::tcp::resolver::iterator; using async_connect_endpoint = asio::ip::tcp::resolver::iterator; template <typename handler_type> inline void post(io_context &context, handler_type &&handler) { context.post(std::forward<handler_type>(handler)); } inline void restart(io_context &context) noexcept { context.reset(); } Loading server_http.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -442,7 +442,7 @@ namespace SimpleWeb { restart(*io_service); if(callback) io_service->post(std::move(callback)); post(*io_service, std::move(callback)); // If thread_pool_size>1, start m_io_service.run() in (thread_pool_size-1) threads for thread-pooling threads.clear(); Loading @@ -461,7 +461,7 @@ namespace SimpleWeb { t.join(); } else if(callback) io_service->post(std::move(callback)); post(*io_service, std::move(callback)); } /// Start the server by calling bind() and accept_and_run(). Loading Loading
asio_compatibility.hpp +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,10 @@ namespace SimpleWeb { using resolver_results = asio::ip::tcp::resolver::results_type; using async_connect_endpoint = asio::ip::tcp::endpoint; template <typename handler_type> inline void post(io_context &context, handler_type &&handler) { asio::post(context, std::forward<handler_type>(handler)); } inline void restart(io_context &context) noexcept { context.restart(); } Loading @@ -51,6 +55,10 @@ namespace SimpleWeb { using resolver_results = asio::ip::tcp::resolver::iterator; using async_connect_endpoint = asio::ip::tcp::resolver::iterator; template <typename handler_type> inline void post(io_context &context, handler_type &&handler) { context.post(std::forward<handler_type>(handler)); } inline void restart(io_context &context) noexcept { context.reset(); } Loading
server_http.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -442,7 +442,7 @@ namespace SimpleWeb { restart(*io_service); if(callback) io_service->post(std::move(callback)); post(*io_service, std::move(callback)); // If thread_pool_size>1, start m_io_service.run() in (thread_pool_size-1) threads for thread-pooling threads.clear(); Loading @@ -461,7 +461,7 @@ namespace SimpleWeb { t.join(); } else if(callback) io_service->post(std::move(callback)); post(*io_service, std::move(callback)); } /// Start the server by calling bind() and accept_and_run(). Loading