id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
      <div><h1><span class="kind-method">cancel</span> method</h1></div>

    <section class="multi-line-signature">
      <span class="returntype">void</span>
            <span class="name ">cancel</span>
(<wbr>)
      
    </section>
    <section class="desc markdown">
      <p>Cancels the connection attempt.</p>
<p>This also causes the <a href="dart-io/ConnectionTask/socket.html">socket</a> <code>Future</code> to complete with a
