on-class.html">SocketException</a> is thrown and all ongoing
connection attempts to <code>host</code> are cancelled.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">static Future&lt;SecureSocket&gt; connect(host, int port,
    {SecurityContext context,
    bool onBadCertificate(X509Certificate certificate),
    List&lt;String&gt; supportedProtocols,
    Duration timeout}) {
 