src/main/java/com/wizzardo/epoll/Connection.java
protected boolean actualWrite(ReadableData readable, ByteBufferProvider bufferProvider) throws IOException {
        if (!isAlive())
            return false;

        ByteBufferWrapper bb = readable.getByteBuffer(bufferProvider);
        bb.clear();
        int r = readable.read(bb);
        if (r > 0) {
//            int written = epoll.write(this, bb.address, bb.offset(), r);
            int written = write(bb, bb.offset(), r);
            bb.clear();
//            System.out.println("write: " + written + " (" + readable.complete() + "/" + readable.length() + ")" + " to " + this);
            if (written != r) {
                readable.unread(r - written);
                return false;
            }
            return true;
        }
        return false;
    }
protected boolean actualWrite(ReadableData readable, ByteBufferProvider bufferProvider) throws IOException {
        if (!isAlive())
            return false;

        ByteBufferWrapper bb = readable.getByteBuffer(bufferProvider);
        bb.clear();
        int r = readable.read(bb);
        if (r > 0) {
//            int written = epoll.write(this, bb.address, bb.offset(), r);
            int written = write(bb, bb.offset(), r);
            bb.clear();
//            System.out.println("write: " + written + " (" + readable.complete() + "/" + readable.length() + ")" + " to " + this);
            if (written != r) {
                readable.unread(r - written);
                return false;
            }
            return true;
        }
        return false;
    }
/*
@return true if connection is ready to write data