From 96f3e0c766593f2cb0949dd3d72936318ea2f3f2 Mon Sep 17 00:00:00 2001 From: TechPriest Date: Wed, 6 May 2015 11:48:35 +0300 Subject: [PATCH] Fixed MSVC build of HTTP server. --- server_http.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server_http.hpp b/server_http.hpp index d82bda3..51b7f95 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -34,7 +34,7 @@ namespace SimpleWeb { strand(strand), yield(yield), socket(socket), async_timer(new boost::asio::deadline_timer(io_service)), async_writing(new bool(false)), async_waiting(new bool(false)), stream(&streambuf) {} - void async_flush(std::function callback=nullptr) { + void async_flush(std::function callback=nullptr) { if(!callback && !socket->lowest_layer().is_open()) { if(*async_waiting) async_timer->cancel(); @@ -131,14 +131,14 @@ namespace SimpleWeb { }; std::unordered_map::Response&, std::shared_ptr::Request>)> > > resource; + std::function::Response&, std::shared_ptr::Request>)> > > resource; std::unordered_map::Response&, std::shared_ptr::Request>)> > default_resource; + std::function::Response&, std::shared_ptr::Request>)> > default_resource; private: std::vector::Response&, std::shared_ptr::Request>)> > > > > opt_resource; + std::function::Response&, std::shared_ptr::Request>)> > > > > opt_resource; public: void start() { @@ -320,7 +320,7 @@ namespace SimpleWeb { } void write_response(std::shared_ptr socket, std::shared_ptr request, - std::function::Response&, std::shared_ptr::Request>)>& resource_function) { + std::function::Response&, std::shared_ptr::Request>)>& resource_function) { std::shared_ptr strand(new boost::asio::strand(io_service)); //Set timeout on the following boost::asio::async-read or write function