/** * Attempt to write the data out to the buffer, if we can. This will either immediately perform * the write, or it will buffer it. * * @return true if this connection blocked and now needs a write callback. */ public boolean tryFlush() { if (!writeBlocked) { writeBlocked = write.flush(); return writeBlocked; } return false; }
/** * Called when the channel can accept more data so we should try writing. * * @return true if this connection is still blocked. */ public boolean writeAvailable() { assert writeBlocked; writeBlocked = write.flush(); return writeBlocked; }