Upgrading from a non-tls connection to a tls connection only makes sense when dealing with a protocol that specifically requires it. It is much simpler and also a bit more secure to start with a TLS connection, instead of upgrading it after the connection is made. The most common case for this...
www.b4x.com