Fixes to the default_resource examples

This commit is contained in:
eidheim 2016-06-28 22:52:12 +02:00
commit c7284acd8f
3 changed files with 55 additions and 31 deletions

View file

@ -181,7 +181,7 @@ namespace SimpleWeb {
io_service.stop();
}
void send(std::shared_ptr<Response> response, const std::function<void(const boost::system::error_code&)>& callback=nullptr) {
void send(std::shared_ptr<Response> response, const std::function<void(const boost::system::error_code&)>& callback=nullptr) const {
boost::asio::async_write(*response->socket, response->streambuf, [this, response, callback](const boost::system::error_code& ec, size_t /*bytes_transferred*/) {
if(callback)
callback(ec);