array.length
-1
=0
>0
308309310311312313314315316317318
begin(); // JDK contract for NIO blocking calls } if (buffer.isDirect()) { sizeReceived = socket.receive(buffer); } else { final byte[] array = buffer.array(); final int position = buffer.position();
316317318319320321322323324325326
final byte[] array = buffer.array(); final int position = buffer.position(); final int limit = buffer.limit(); sizeReceived = socket.receive(array, position, limit); if (0 < sizeReceived && sizeReceived <= remaining) { buffer.position(position + sizeReceived); }
310311312313314315316317318319320
318319320321322323324325326327328
305306307308309310311312313314315
313314315316317318319320321322323
7879808182838485868788
double maxMbs = -1; while ((System.currentTimeMillis() - start) < 15000) { clientSocket.send(data); acceptSocket.receive(data); if (System.currentTimeMillis() - interval > 1000) { interval = System.currentTimeMillis();
8586878889909192939495
155156157158159160161162163164165
buffer.rewind(); final TimerContext timer = recvTime.time(); final int count = server.receive(buffer); timer.stop(); if (count != size) { throw new Exception("count");
while (true) { final byte[] array = new byte[SIZE]; final int result = receiver.receive(array); assert result == SIZE : "wrong size"; getSequenceNumber(array);