written = getSelectorPool().write(bytebuffer, socket, selector, writeTimeout);
//make sure we are flushed
do {
- if (socket.flush(selector)) break;
+ if (socket.flush(true,selector,writeTimeout)) break;
}while ( true );
}finally {
if ( selector != null ) getSelectorPool().put(selector);
* been flushed out and is empty
* @return boolean
*/
- public boolean flush(Selector s) throws IOException {
+ public boolean flush(boolean block, Selector s,long timeout) throws IOException {
return true; //no network buffer in the regular channel
}
* been flushed out and is empty
* @return boolean
*/
- public boolean flush(Selector s, long timeout) throws IOException {
+ public boolean flush(boolean block, Selector s, long timeout) throws IOException {
pool.write(netOutBuffer,this,s,timeout);
return !netOutBuffer.hasRemaining();
}