title: Enable TLS on open socket (STARTTLS)
body: <p>Looks like SSL/TLS support has recently been <a href="https://stackoverflow.com/questions/10882158/does-dart-support-client-ssl-tls-connections-yet">added</a> to Dart via the <a href="http://api.dartlang.org/docs/bleeding_edge/dart_io/SecureSocket.html" rel="nofollow noreferrer">SecureSocket</a> class, which is great. </p>
  
  <p>So, for example this</p>
  
  <pre><code>SecureSocket.connect(_host, _port).then(
          (Socket socket) {
            ...
  </code></pre>
  
  <p>opens a socket with TLS enabled right away. However, what I'd like to do is open a regular (not secure) socket, send and receive some unencrypted data first, and enable TLS on it later.</p>
  
  <p>Here's how it can be done in PHP:</p>
  
  <pre><code>$socket = fsockopen($server, $port, $errno, $errstr);
  // ... do some unencrypted stuff...
  stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
  </code></pre>
  
  <p>Any way to do this in Dart?</p>
  
  <p>EDIT: I guess what I'm looking for is a Dart implementation of <a href="http://en.wikipedia.org/wiki/STARTTLS" rel="nofollow noreferrer">STARTTLS</a>.</p>