Author: markt
Date: Thu Feb 23 22:28:32 2012
New Revision: 1292995

URL: http://svn.apache.org/viewvc?rev=1292995&view=rev
Log:
Review comments on r1292776 from kkolinko

Modified:
    tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java

Modified: tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java?rev=1292995&r1=1292994&r2=1292995&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java (original)
+++ tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java Thu Feb 23 
22:28:32 2012
@@ -104,8 +104,8 @@ public class WsOutbound {
 
     /**
      * Flush any message (binary or textual) that may be buffered and then send
-     * the a WebSocket binary message as a single frame with the provided 
buffer
-     * as the payload of the message.
+     * a WebSocket binary message as a single frame with the provided buffer as
+     * the payload of the message.
      *
      * @param msgBb The buffer containing the payload
      *
@@ -123,8 +123,8 @@ public class WsOutbound {
 
     /**
      * Flush any message (binary or textual) that may be buffered and then send
-     * the a WebSocket text message as a single frame with the provided buffer
-     * as the payload of the message.
+     * a WebSocket text message as a single frame with the provided buffer as
+     * the payload of the message.
      *
      * @param msgBb The buffer containing the payload
      *
@@ -166,7 +166,7 @@ public class WsOutbound {
 
 
     /**
-     * Respond to a client close by sending a close that echos the status code
+     * Respond to a client close by sending a close that echoes the status code
      * and message.
      *
      * @param frame The close frame received from a client
@@ -274,7 +274,8 @@ public class WsOutbound {
             upgradeOutbound.write(0);
         } else {
             upgradeOutbound.write(data.limit());
-            upgradeOutbound.write(data.array(), 0, data.limit());
+            upgradeOutbound.write(data.array(), data.position(),
+                    data.limit() - data.position());
         }
 
         upgradeOutbound.flush();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to