ket_socket.close.overload2.example">Example</a>
          </h6>
<pre class="programlisting">boost::asio::ip::tcp::socket socket(io_context);
...
boost::system::error_code ec;
socket.close(ec);
if (ec)
{
  // An error occurred.
}
</pre>
<h6>
<a name="boost_asio.reference.basic_seq_packet_socket.close.overload2.h2"></a>
            <span class="phrase"><a name="boost_asio.reference.basic_seq_packet_socket.close.overload2.remarks"></a></span><a class="link" href="overload2.html#boost_asio.reference.basic_seq_p