public void start() throws IOException {
        while (!initialHSComplete) {
            initialHSComplete = doHandshake(null);
        }
    }
Creates a new TLSStreamHandler and encrypt the plain socket connection. When connecting
to a remote server then {@code clientMode} will be <code>true</code> and
{@code remoteServer} is the server name of the remote server. Otherwise {@code clientMode}
will be <code>false</code> and  {@code remoteServer} null.

@param socket the plain socket connection to encrypt
@param configuration the configuration for the connection
@param clientMode boolean indicating if this entity is a client or a server.
@throws java.io.IOException if an exception occurs
xmppserver/src/main/java/org/jivesoftware/openfire/net/TLSStreamHandler.java