<p>
            <span class="emphasis"><em>Inherited from basic_socket.</em></span>
          </p>
<p>
            Cancel all asynchronous operations associated with the socket.
          </p>
<pre class="programlisting">void cancel();
</pre>
<p>
            This function causes all outstanding asynchronous connect, send and receive
            operations to finish immediately, and the handlers for cancelled operations
            will be passed the <code class="computeroutput">boost::asio::error::operation