2
0
mirror of https://github.com/boostorg/beast.git synced 2026-01-30 07:42:10 +00:00

example/cppcon2018 only requires C++11

This commit is contained in:
Vinnie Falco
2018-11-22 17:28:57 -08:00
parent e0b3aa7745
commit 7b93cca28a
4 changed files with 39 additions and 38 deletions

View File

@@ -203,11 +203,11 @@ run()
{
// Read a request
http::async_read(socket_, buffer_, req_,
[self = shared_from_this()]
(error_code ec, std::size_t bytes)
{
self->on_read(ec, bytes);
});
std::bind(
&http_session::on_read,
shared_from_this(),
std::placeholders::_1,
std::placeholders::_2));
}
// Report a failure
@@ -341,9 +341,9 @@ on_write(error_code ec, std::size_t, bool close)
// Read another request
http::async_read(socket_, buffer_, req_,
[self = shared_from_this()]
(error_code ec, std::size_t bytes)
{
self->on_read(ec, bytes);
});
std::bind(
&http_session::on_read,
shared_from_this(),
std::placeholders::_1,
std::placeholders::_2));
}