add block/no block flag to flushing the SSL buffer
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 21 May 2007 09:54:46 +0000 (09:54 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 21 May 2007 09:54:46 +0000 (09:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@540093 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/InternalNioOutputBuffer.java
java/org/apache/tomcat/util/net/NioChannel.java
java/org/apache/tomcat/util/net/SecureNioChannel.java

index e54d2d2..a7cbf6d 100644 (file)
@@ -433,7 +433,7 @@ public class InternalNioOutputBuffer
             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);
index ce34154..901ef5f 100644 (file)
@@ -70,7 +70,7 @@ public class NioChannel implements ByteChannel{
      * 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
     }
 
index b7b6914..3593b37 100644 (file)
@@ -102,7 +102,7 @@ public class SecureNioChannel extends NioChannel  {
      * 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();
     }