src/main/java/net/batchik/crdt/fiber/FiberChannels.java
/**
     * Write all remaining bytes in buffer to the given channel.
     * If the channel is selectable then it must be configured blocking.
     */
Write all remaining bytes in buffer to the given channel.
If the channel is selectable then it must be configured blocking.
Write all remaining bytes in buffer to the given channel . If the channel is selectable then it must be configured blocking .
private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb)
            throws IOException, ExecutionException, InterruptedException, SuspendExecution {
        while (bb.remaining() > 0) {
            int n = 0;
            try {
                n = ch.write(bb);
            } catch (IOException e) {
                log.warn("exception while writing to socket");
                return;
            }
        }
    }
private static void writeFullyImpl ( WritableByteChannel ch , ByteBuffer bb ) throws IOException , ExecutionException , InterruptedException , SuspendExecution { while ( bb . remaining ( ) > 0 ) { int n = 0 ; try { n = ch . write ( bb ) ; } catch ( IOException e ) { log . warn ( "exception while writing to socket" ) ; return ; } } }
Write all remaining bytes in buffer to the given channel.
Write all remaining bytes in buffer to the given channel .
//if (n <= 0) //    throw new RuntimeException("no bytes written");