class RpcStreamConnection extends RpcConnection {

    private void initSSL() throws ConnectionException {
        // Start SSL handshake
        if (nonNull(socket)) {
            try {
                // The SSLSocket.getSession() method will initiate the initial
                // handshake if necessary. Thus, the SSLSocket.startHandshake()
                // call is not necessary.
                SSLSession sslSession = ((SSLSocket) socket).getSession();

                /*
                 * If an error occurs during the initial handshake, this method
                 * returns an invalid session object which reports an invalid
                 * cipher suite of "SSL_NULL_WITH_NULL_NULL".
                 */
                throwConnectionExceptionIfConditionFails(sslSession.isValid(),
                        "Error occurred during the SSL handshake: invalid SSL session");
                // Get the certificates
                Certificate[] serverCerts = sslSession.getPeerCertificates();

                throwConnectionExceptionIfConditionFails(
                        nonNull(serverCerts) && (serverCerts.length != 0)
                                && nonNull(serverCerts[0]),
                        "Error occurred during the SSL handshake: no certificate retrieved from SSL session");

                // Check that the certificate is currently valid. Check the
                // current date and time are within the validity period given
                // in the certificate.
                ((X509Certificate) serverCerts[0]).checkValidity();

                // Get the public key from the first certificate
                PublicKey serverPubKey = serverCerts[0].getPublicKey();
                throwConnectionExceptionIfConditionFails(nonNull(serverPubKey),
                        "Error occurred during the SSL handshake: no public key retrieved from server certificate");

                // Generate the fingerprint
                fingerprint = ClientTrust.generateFingerprint(serverPubKey);
            } catch (CertificateExpiredException e) {
                throwConnectionException(e,
                        "Error occurred during the SSL handshake: certificate expired:");
            } catch (CertificateNotYetValidException e) {
                throwConnectionException(e,
                        "Error occurred during the SSL handshake: certificate not yet valid");
            } catch (NoSuchAlgorithmException e) {
                throwConnectionException(e,
                        "Error occurred while generating the fingerprint for the Perforce SSL connection");
            } catch (IOException e) {
                String errorMessage = format(
                        "Error occurred during SSL hankshake. Please check the release notes for known SSL issues");
                Log.error(errorMessage);
                Log.exception(e);
                throwConnectionException(e, errorMessage);
            }
        }
    }

    public  RpcStreamConnection(String serverHost, int serverPort, Properties props,
                               ServerStats stats, P4Charset p4Charset, boolean secure);
    private  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, boolean secure);
    private  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, RpcSocketPool pool, boolean secure);
    public  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, RpcSocketPool pool, boolean secure,
            String rsh);

}