notes, still need some work on the write to socket
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 7 Jun 2007 13:48:07 +0000 (13:48 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 7 Jun 2007 13:48:07 +0000 (13:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@545180 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/InternalNioOutputBuffer.java
webapps/docs/aio.xml

index 70a4892..df5dc71 100644 (file)
@@ -417,6 +417,7 @@ public class InternalNioOutputBuffer
      * @param flip boolean
      * @return int
      * @throws IOException
+     * @todo Fix non blocking write properly
      */
     private synchronized int writeToSocket(ByteBuffer bytebuffer, boolean flip, boolean block) throws IOException {
         //int limit = bytebuffer.position();
@@ -440,7 +441,7 @@ public class InternalNioOutputBuffer
         }finally { 
             if ( selector != null ) getSelectorPool().put(selector);
         }
-        socket.getBufHandler().getWriteBuffer().clear();
+        if ( block ) socket.getBufHandler().getWriteBuffer().clear(); //only clear
         this.total = 0;
         return written;
     } 
index 520ea91..b6143d5 100644 (file)
@@ -409,7 +409,7 @@ public class ChatServlet
   <subsection name="Comet timeouts">
     <p>If you are using the NIO connector, you can set individual timeouts for your different comet connections.
        To set a timeout, simple set a request attribute like the following code shows:
-       <source>CometEvent event.... event.setTimeout(30*1000);</source> 
+       <source>event.setTimeout(30*1000);</source> 
        <br/>You can set the timeout on the comet connection at any point in time, even asynchronously.
        Setting a timeout to 1 (one milliseconds) doesn't guarantee that it will timeout at that time.
        Setting the timeout gurantees that Tomcat wont timeout the connection before the connection has been idle