class RpcStreamConnection extends RpcConnection {

    private void initSocketBasedServer() throws ConnectionException {
        try {
            if (isNull(socket)) {
                if (nonNull(pool)) {
                    socket = pool.acquire();
                } else {
                    socket = RpcSocketHelper.createSocket(hostName, hostPort, props, secure);
                }
            }
        } catch (UnknownHostException exc) {
            throwConnectionException(exc,
                    "Unable to resolve Perforce server host name '%s' for RPC connection",
                    hostName);
        } catch (IOException exc) {
            throwConnectionException(exc, "Unable to connect to Perforce server at %s:%s", hostName,
                    hostPort);
        } catch (Throwable thr) {
            Log.error("Unexpected exception: %s", thr.getLocalizedMessage());
            Log.exception(thr);
            throwConnectionException(thr);
        }

        getIpAddressFromSocketConnection();

        // Initialize SSL connection
        if (secure) {
            initSSL();
        }

        initRpcSocketInputAndOutputStreamIfSocketBasedServer();
    }

    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);

}