/** * Do the work required to read from a readable client. If the frame is * fully read, then invoke the method call. */ private void handleRead(SelectionKey key) { FrameBuffer buffer = (FrameBuffer)key.attachment(); if (buffer.read()) { // if the buffer's frame read is complete, invoke the method. if (buffer.isFrameFullyRead()) { requestInvoke(buffer); } } else { cleanupSelectionkey(key); } }
/** * Do the work required to read from a readable client. If the frame is * fully read, then invoke the method call. */ private void handleRead(SelectionKey key) { FrameBuffer buffer = (FrameBuffer)key.attachment(); if (!buffer.read()) { cleanupSelectionkey(key); return; } // if the buffer's frame read is complete, invoke the method. if (buffer.isFrameFullyRead()) { if (!requestInvoke(buffer)) { cleanupSelectionkey(key); } } }
/** * Do the work required to read from a readable client. If the frame is * fully read, then invoke the method call. */ private void handleRead(SelectionKey key) { FrameBuffer buffer = (FrameBuffer)key.attachment(); if (!buffer.read()) { cleanupSelectionkey(key); return; } // if the buffer's frame read is complete, invoke the method. if (buffer.isFrameFullyRead()) { if (!requestInvoke(buffer)) { cleanupSelectionkey(key); } } }