Fixes to the default_resource examples
This commit is contained in:
parent
dc466e7d1d
commit
c7284acd8f
3 changed files with 55 additions and 31 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue