// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
{
public:
/// Constructor.
- connection(boost::asio::io_service& io_service)
- : socket_(io_service)
+ connection(boost::asio::io_context& io_context)
+ : socket_(io_context)
{
}
{
// Something went wrong, inform the caller.
boost::system::error_code error(boost::asio::error::invalid_argument);
- socket_.get_io_service().post(boost::bind(handler, error));
+ boost::asio::post(socket_.get_executor(), boost::bind(handler, error));
return;
}
outbound_header_ = header_stream.str();