class RpcStreamConnection extends RpcConnection {

    int continueReadIfIncompleteRead(@Nonnull final AtomicLong streamRecvs,
            final int payloadLength, @Nonnull final byte[] packetBytes, final int packetBytesRead)
            throws IOException, ConnectionException {
        int totalPacketBytesRead = packetBytesRead;
        while (totalPacketBytesRead < payloadLength) {
            stats.incompleteReads.incrementAndGet();
            int moreBytesRead = topInputStream.read(packetBytes, totalPacketBytesRead,
                    payloadLength - totalPacketBytesRead);
            throwConnectionExceptionIfConditionFails(moreBytesRead >= 0,
                    "Perforce server network connection closed unexpectedly");

            streamRecvs.incrementAndGet();
            stats.totalBytesRecv.getAndAdd(moreBytesRead);
            totalPacketBytesRead += moreBytesRead;
        }
        return totalPacketBytesRead;
    }

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

}