title: Boost 1.70 io_service deprecation
body: <p>I'm trying to migrate some old code from using io_service to io_context for the basic tcp acceptor, but am running into issues when switching get_io_service() to get_executor().context() results in the following error:</p>
  <pre><code>cannot convert ‘boost::asio::execution_context’ to ‘boost::asio::io_context&amp;’
  </code></pre>
  <p>This is the listener:</p>
  <pre><code>ImageServerListener::ImageServerListener(boost::asio::io_context&amp; io)
  {
      _acceptor = new boost::asio::ip::tcp::acceptor(io, boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), sConfig.net.imageServerPort));
      StartAccept();
  }
  
  ImageServerListener::~ImageServerListener()
  {
      delete _acceptor;
  }
  
  void ImageServerListener::StartAccept()
  {
      std::shared_ptr&lt;ImageServerConnection&gt; connection = ImageServerConnection::create(_acceptor-&gt;get_executor().context());
      _acceptor-&gt;async_accept(connection-&gt;socket(), std::bind(&amp;ImageServerListener::HandleAccept, this, connection));
  }
  
  void ImageServerListener::HandleAccept(std::shared_ptr&lt;ImageServerConnection&gt; connection)
  {
      connection-&gt;Process();
      StartAccept();
  }
  </code></pre>
  <p>What would have to be changed in order to return an io_context instead of an execution_context?</p>