class RpcStreamConnection extends RpcConnection {

    void initRshModeServer() throws ConnectionException {
        try {
            String[] command = new String[] { Server.isRunningOnWindows() ? "cmd.exe" : "/bin/sh",
                    Server.isRunningOnWindows() ? "/c" : "-c", rsh };

            ProcessBuilder builder = new ProcessBuilder(command);
            // builder.redirectErrorStream(true); // redirect error stream to
            // output stream
            Process process = builder.start();
            InputStream in = process.getInputStream();
            OutputStream out = process.getOutputStream();
            // InputStream err = process.getErrorStream();

            inputStream = new RpcRshInputStream(in, stats);
            outputStream = new RpcRshOutputStream(out, stats);
	// p4ic4idea: never, never, never catch a Throwable,
	// unless you're really careful, which this is not.
	// } catch (Throwable thr) {
	} catch (Exception thr) {
            Log.error("Unexpected exception: %s", thr.getLocalizedMessage());
            Log.exception(thr);
            throwConnectionException(thr);
        }
    }

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

}