private int read4Bytes() throws IOException { if (this.dataLengthBuffer.remaining() > 0) { return this.rpcServer.channelRead(channel, this.dataLengthBuffer); } else { return 0; } }
@Override public int read() throws IOException { SimpleServerRpcConnection.this.rpcServer.channelRead(channel, buf); buf.flip(); int x = buf.get(); buf.flip(); return x; } };
private int readPreamble() throws IOException { if (preambleBuffer == null) { preambleBuffer = ByteBuffer.allocate(6); } int count = this.rpcServer.channelRead(channel, preambleBuffer); if (count < 0 || preambleBuffer.remaining() > 0) { return count; } preambleBuffer.flip(); if (!processPreamble(preambleBuffer)) { return -1; } preambleBuffer = null; // do not need it anymore connectionPreambleRead = true; return count; }
int count; if (unwrappedDataLengthBuffer.remaining() > 0) { count = this.rpcServer.channelRead(ch, unwrappedDataLengthBuffer); if (count <= 0 || unwrappedDataLengthBuffer.remaining() > 0) return; count = this.rpcServer.channelRead(ch, unwrappedData); if (count <= 0 || unwrappedData.remaining() > 0) return;
private int read4Bytes() throws IOException { if (this.dataLengthBuffer.remaining() > 0) { return channelRead(channel, this.dataLengthBuffer); } else { return 0; } }
int count; if (unwrappedDataLengthBuffer.remaining() > 0) { count = channelRead(ch, unwrappedDataLengthBuffer); if (count <= 0 || unwrappedDataLengthBuffer.remaining() > 0) return; count = channelRead(ch, unwrappedData); if (count <= 0 || unwrappedData.remaining() > 0) return;
count = channelRead(channel, data);
count = channelRead(channel, versionAndAuthBytes); if (count < 0 || versionAndAuthBytes.remaining() > 0) { return count;