o::placeholders::error));
  }

  void handle_accept(tcp_connection::pointer new_connection,
      const boost::system::error_code&amp; error)
  {
    if (!error)
    {
      new_connection-&gt;start();
    }

    start_accept();
  }

  tcp::acceptor acceptor_;
};

int main()
{
  try
  {
    boost::asio::io_context io_context;
    tcp_server server(io_context);
    io_context.run();
  }
  catch (std::exception&amp; e)
  {
    std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;
  }

  return 0;
}
</pre>
<p>
     