iv></div></div>
<p>
            <span class="emphasis"><em>Inherited from basic_socket.</em></span>
          </p>
<p>
            Close the socket.
          </p>
<pre class="programlisting">void close(
    boost::system::error_code &amp; ec);
</pre>
<p>
            This function is used to close the socket. Any asynchronous send, receive
            or connect operations will be cancelled immediately, and will complete
            with the <code class="computeroutput">boost::asio::error::operation_aborted