tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1618834 - in /tomcat/trunk/java/org/apache/tomcat/websocket: MessagePart.java WsRemoteEndpointImplBase.java
Date Tue, 19 Aug 2014 10:40:13 GMT
Author: markt
Date: Tue Aug 19 10:40:12 2014
New Revision: 1618834

URL: http://svn.apache.org/r1618834
Log:
Add rsv to MessagePart and re-order constructor to match order elements
are used in RFC 6455

Modified:
    tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java
    tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java?rev=1618834&r1=1618833&r2=1618834&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java Tue Aug 19 10:40:12 2014
@@ -21,20 +21,32 @@ import java.nio.ByteBuffer;
 import javax.websocket.SendHandler;
 
 class MessagePart {
+    private final boolean fin;
+    private final int rsv;
     private final byte opCode;
     private final ByteBuffer payload;
-    private final boolean fin;
     private final SendHandler handler;
 
-    public MessagePart(byte opCode, ByteBuffer payload, boolean fin,
+    public MessagePart( boolean fin, int rsv, byte opCode, ByteBuffer payload,
             SendHandler handler) {
+        this.fin = fin;
+        this.rsv = rsv;
         this.opCode = opCode;
         this.payload = payload;
-        this.fin = fin;
         this.handler = handler;
     }
 
 
+    public boolean isFin() {
+        return fin;
+    }
+
+
+    public int getRsv() {
+        return rsv;
+    }
+
+
     public byte getOpCode() {
         return opCode;
     }
@@ -45,11 +57,6 @@ class MessagePart {
     }
 
 
-    public boolean isFin() {
-        return fin;
-    }
-
-
     public SendHandler getHandler() {
         return handler;
     }

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1618834&r1=1618833&r2=1618834&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Tue Aug 19
10:40:12 2014
@@ -257,7 +257,7 @@ public abstract class WsRemoteEndpointIm
         wsSession.updateLastActive();
 
         List<MessagePart> messageParts = new ArrayList<>();
-        messageParts.add(new MessagePart(opCode, payload, last,
+        messageParts.add(new MessagePart(last, 0, opCode, payload,
                 new EndMessageHandler(this, handler)));
 
         messageParts = transformation.sendMessagePart(messageParts);



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


Mime
View raw message