/** * returns true if the network buffer has * been flushed out and is empty * @return boolean */ public boolean flush(boolean block, Selector s, long timeout,MutableInteger lastWrite) throws IOException { if (lastWrite!=null) lastWrite.set(1); return true; //no network buffer in the regular channel }
/** * returns true if the network buffer has * been flushed out and is empty * @return boolean */ public boolean flush(boolean block, Selector s, long timeout,MutableInteger lastWrite) throws IOException { if (lastWrite!=null) lastWrite.set(1); return true; //no network buffer in the regular channel }
/** * Returns true if the network buffer has been flushed out and is empty. * * @param block Unused. May be used when overridden * @param s Unused. May be used when overridden * @param timeout Unused. May be used when overridden * @param lastWrite * @return Always returns <code>true</code> since there is no network buffer * in the regular channel * @throws IOException */ public boolean flush(boolean block, Selector s, long timeout,MutableInteger lastWrite) throws IOException { if (lastWrite!=null) lastWrite.set(1); return true; }
/** * Recycle the output buffer. This should be called when closing the * connection. */ @Override public void recycle() { super.recycle(); if (socket != null) { socket.getBufHandler().getWriteBuffer().clear(); socket = null; } lastWrite.set(1); }
/** * Recycle the output buffer. This should be called when closing the * connection. */ @Override public void recycle() { super.recycle(); if (socket != null) { socket.getBufHandler().getWriteBuffer().clear(); socket = null; } lastWrite.set(1); }
if ( keycount > 0 ) { //only write if we were registered for a write if (lastWrite!=null) lastWrite.set(cnt); if (cnt == -1) throw new EOFException();
if ( keycount > 0 ) { //only write if we were registered for a write if (lastWrite!=null) lastWrite.set(cnt); if (cnt == -1) throw new EOFException();
if ( keycount > 0 ) { //only write if we were registered for a write if (lastWrite!=null) lastWrite.set(cnt); if (cnt == -1) throw new EOFException();
/** * Recycle the output buffer. This should be called when closing the * connection. */ public void recycle() { // Recycle filters for (int i = 0; i <= lastActiveFilter; i++) { activeFilters[i].recycle(); } // Recycle Request object response.recycle(); if (socket != null) { socket.getBufHandler().getWriteBuffer().clear(); socket = null; } pos = 0; lastActiveFilter = -1; committed = false; finished = false; lastWrite.set(1); }
if (keycount > 0) { //only write if we were registered for a write int cnt = socket.write(buf); //write the data lastWrite.set(cnt); if (cnt == -1) throw new EOFException();
if (keycount > 0) { //only write if we were registered for a write int cnt = socket.write(buf); //write the data if (lastWrite != null) lastWrite.set(cnt); if (cnt == -1) throw new EOFException();
if (keycount > 0) { //only write if we were registered for a write int cnt = socket.write(buf); //write the data lastWrite.set(cnt); if (cnt == -1) throw new EOFException();