From ac6db57db934dc18d8bbc98028af08fdd9f135ca Mon Sep 17 00:00:00 2001
From: Marcel Prestel Summary report generated on 2019-04-12T14:37:19.401Z (UTC) by Autobahn WebSocket Testsuite v0.8.1/v0.10.9. Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Summary report generated on 2019-04-12T14:37:19.401Z (UTC) by Autobahn WebSocket Testsuite v0.8.1/v0.10.9. Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Expectation Case Description Case Description Case Expectation Case Description Case Description Case Expectation
+ * Extensions are required to be registered in
+ * @see Draft objects and both
+ * @see WebSocketClient and
+ * @see WebSocketServer accept a
+ * @see Draft object in their constructors.
+ * This example shows how to achieve it for both server and client sockets.
+ * Once the connection has been established, PerMessageDeflateExtension will be enabled
+ * and any messages (binary or text) will be compressed/decompressed automatically.
+ * Since no additional code is required when sending or receiving messages, this example skips those parts.
+ */
+public class PerMessageDeflateExample {
+
+ private static final Draft perMessageDeflateDraft = new Draft_6455(new PerMessageDeflateExtension());
+ private static final int PORT = 8887;
+
+ private static class DeflateClient extends WebSocketClient {
+
+ public DeflateClient() throws URISyntaxException {
+ super(new URI("ws://localhost:" + PORT), perMessageDeflateDraft);
+ }
+
+ @Override
+ public void onOpen(ServerHandshake handshakedata) { }
+
+ @Override
+ public void onMessage(String message) { }
+
+ @Override
+ public void onClose(int code, String reason, boolean remote) { }
+
+ @Override
+ public void onError(Exception ex) { }
+ }
+
+ private static class DeflateServer extends WebSocketServer {
+
+ public DeflateServer() {
+ super(new InetSocketAddress(PORT), Collections.singletonList(perMessageDeflateDraft));
+ }
+
+ @Override
+ public void onOpen(WebSocket conn, ClientHandshake handshake) { }
+
+ @Override
+ public void onClose(WebSocket conn, int code, String reason, boolean remote) { }
+
+ @Override
+ public void onMessage(WebSocket conn, String message) { }
+
+ @Override
+ public void onError(WebSocket conn, Exception ex) { }
+
+ @Override
+ public void onStart() { }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java b/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java
new file mode 100644
index 000000000..4c1999b74
--- /dev/null
+++ b/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java
@@ -0,0 +1,185 @@
+package org.java_websocket.extensions.permessage_deflate;
+
+import org.java_websocket.enums.Opcode;
+import org.java_websocket.exceptions.InvalidDataException;
+import org.java_websocket.exceptions.InvalidFrameException;
+import org.java_websocket.extensions.CompressionExtension;
+import org.java_websocket.extensions.IExtension;
+import org.java_websocket.framing.*;
+
+import java.io.ByteArrayOutputStream;
+import java.nio.ByteBuffer;
+import java.util.zip.DataFormatException;
+import java.util.zip.Deflater;
+import java.util.zip.Inflater;
+
+public class PerMessageDeflateExtension extends CompressionExtension {
+
+ // Name of the extension as registered by IETF https://tools.ietf.org/html/rfc7692#section-9.
+ private static final String EXTENSION_REGISTERED_NAME = "permessage-deflate";
+
+ // Below values are defined for convenience. They are not used in the compression/decompression phase.
+ // They may be needed during the extension-negotiation offer in the future.
+ private static final String SERVER_NO_CONTEXT_TAKEOVER = "server_no_context_takeover";
+ private static final String CLIENT_NO_CONTEXT_TAKEOVER = "client_no_context_takeover";
+ private static final String SERVER_MAX_WINDOW_BITS = "server_max_window_bits";
+ private static final String CLIENT_MAX_WINDOW_BITS = "client_max_window_bits";
+ private static final boolean serverNoContextTakeover = true;
+ private static final boolean clientNoContextTakeover = true;
+ private static final int serverMaxWindowBits = 1 << 15;
+ private static final int clientMaxWindowBits = 1 << 15;
+
+ private static final byte[] TAIL_BYTES = {0x00, 0x00, (byte)0xFF, (byte)0xFF};
+ private static final int BUFFER_SIZE = 1 << 10;
+
+ /*
+ An endpoint uses the following algorithm to decompress a message.
+ 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the
+ payload of the message.
+ 2. Decompress the resulting data using DEFLATE.
+ See, https://tools.ietf.org/html/rfc7692#section-7.2.2
+ */
+ @Override
+ public void decodeFrame(Framedata inputFrame) throws InvalidDataException {
+ // Only DataFrames can be decompressed.
+ if(!(inputFrame instanceof DataFrame))
+ return;
+
+ // RSV1 bit must be set only for the first frame.
+ if(inputFrame.getOpcode() == Opcode.CONTINUOUS && inputFrame.isRSV1())
+ throw new InvalidDataException(CloseFrame.POLICY_VALIDATION, "RSV1 bit can only be set for the first frame.");
+
+ // Decompressed output buffer.
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ Inflater inflater = new Inflater(true);
+ try {
+ decompress(inflater, inputFrame.getPayloadData().array(), output);
+ // Decompress 4 bytes of 0x00 0x00 0xff 0xff as if they were appended to the end of message.
+ if(inputFrame.isFin())
+ decompress(inflater, TAIL_BYTES, output);
+ } catch (DataFormatException e) {
+ throw new InvalidDataException(CloseFrame.POLICY_VALIDATION, "Given data format couldn't be decompressed.");
+ }finally {
+ inflater.end();
+ }
+
+ // Set frames payload to the new decompressed data.
+ ((FramedataImpl1) inputFrame).setPayload(ByteBuffer.wrap(output.toByteArray()));
+ }
+
+ private void decompress(Inflater inflater, byte[] data, ByteArrayOutputStream outputBuffer) throws DataFormatException{
+ inflater.setInput(data);
+ byte[] buffer = new byte[BUFFER_SIZE];
+
+ int bytesInflated;
+ while((bytesInflated = inflater.inflate(buffer)) > 0){
+ outputBuffer.write(buffer, 0, bytesInflated);
+ }
+ }
+
+ @Override
+ public void encodeFrame(Framedata inputFrame) {
+ // Only DataFrames can be decompressed.
+ if(!(inputFrame instanceof DataFrame))
+ return;
+
+ // Only the first frame's RSV1 must be set.
+ if(!(inputFrame instanceof ContinuousFrame))
+ ((DataFrame) inputFrame).setRSV1(true);
+
+ Deflater deflater = new Deflater(Deflater.DEFAULT_COMPRESSION, true);
+ deflater.setInput(inputFrame.getPayloadData().array());
+ deflater.finish();
+
+ // Compressed output buffer.
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ // Temporary buffer to hold compressed output.
+ byte[] buffer = new byte[1024];
+ int bytesCompressed;
+ while((bytesCompressed = deflater.deflate(buffer)) > 0) {
+ output.write(buffer, 0, bytesCompressed);
+ }
+ deflater.end();
+
+ byte outputBytes[] = output.toByteArray();
+ int outputLength = outputBytes.length;
+ /*
+ https://tools.ietf.org/html/rfc7692#section-7.2.1 states that if the final fragment's compressed
+ payload ends with 0x00 0x00 0xff 0xff, they should be removed.
+ To simulate removal, we just pass 4 bytes less to the new payload
+ if the frame is final and outputBytes ends with 0x00 0x00 0xff 0xff.
+ */
+ if(inputFrame.isFin() && endsWithTail(outputBytes))
+ outputLength -= TAIL_BYTES.length;
+
+ // Set frames payload to the new compressed data.
+ ((FramedataImpl1) inputFrame).setPayload(ByteBuffer.wrap(outputBytes, 0, outputLength));
+ }
+
+ private boolean endsWithTail(byte[] data){
+ if(data.length < 4)
+ return false;
+
+ int length = data.length;
+ for(int i = 0; i <= TAIL_BYTES.length; i--){
+ if(TAIL_BYTES[i] != data[length - TAIL_BYTES.length + i])
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean acceptProvidedExtensionAsServer(String inputExtension) {
+ String[] requestedExtensions = inputExtension.split(",");
+ for(String extension : requestedExtensions)
+ if(EXTENSION_REGISTERED_NAME.equalsIgnoreCase(extension.trim()))
+ return true;
+
+ return false;
+ }
+
+ @Override
+ public boolean acceptProvidedExtensionAsClient(String inputExtension) {
+ String[] requestedExtensions = inputExtension.split(",");
+ for(String extension : requestedExtensions)
+ if(EXTENSION_REGISTERED_NAME.equalsIgnoreCase(extension.trim()))
+ return true;
+
+ return false;
+ }
+
+ @Override
+ public String getProvidedExtensionAsClient() {
+ return EXTENSION_REGISTERED_NAME;
+ }
+
+ @Override
+ public String getProvidedExtensionAsServer() {
+ return EXTENSION_REGISTERED_NAME;
+ }
+
+ @Override
+ public IExtension copyInstance() {
+ return new PerMessageDeflateExtension();
+ }
+
+ /**
+ * This extension requires the RSV1 bit to be set only for the first frame.
+ * If the frame is type is CONTINUOUS, RSV1 bit must be unset.
+ */
+ @Override
+ public void isFrameValid(Framedata inputFrame) throws InvalidDataException {
+ if((inputFrame instanceof TextFrame || inputFrame instanceof BinaryFrame) && !inputFrame.isRSV1())
+ throw new InvalidFrameException("RSV1 bit must be set for DataFrames.");
+ if((inputFrame instanceof ContinuousFrame) && (inputFrame.isRSV1() || inputFrame.isRSV2() || inputFrame.isRSV3()))
+ throw new InvalidFrameException( "bad rsv RSV1: " + inputFrame.isRSV1() + " RSV2: " + inputFrame.isRSV2() + " RSV3: " + inputFrame.isRSV3() );
+ super.isFrameValid(inputFrame);
+ }
+
+ @Override
+ public String toString() {
+ return "PerMessageDeflateExtension";
+ }
+
+}
\ No newline at end of file
diff --git a/src/test/java/org/java_websocket/extensions/PerMessageDeflateExtensionTest.java b/src/test/java/org/java_websocket/extensions/PerMessageDeflateExtensionTest.java
new file mode 100644
index 000000000..a419b55ee
--- /dev/null
+++ b/src/test/java/org/java_websocket/extensions/PerMessageDeflateExtensionTest.java
@@ -0,0 +1,118 @@
+package org.java_websocket.extensions;
+
+import org.java_websocket.exceptions.InvalidDataException;
+import org.java_websocket.extensions.permessage_deflate.PerMessageDeflateExtension;
+import org.java_websocket.framing.ContinuousFrame;
+import org.java_websocket.framing.TextFrame;
+import org.junit.Test;
+
+import java.nio.ByteBuffer;
+
+import static org.junit.Assert.*;
+
+public class PerMessageDeflateExtensionTest {
+
+ @Test
+ public void testDecodeFrame() throws InvalidDataException {
+ PerMessageDeflateExtension deflateExtension = new PerMessageDeflateExtension();
+ String str = "This is a highly compressable text"
+ + "This is a highly compressable text"
+ + "This is a highly compressable text"
+ + "This is a highly compressable text"
+ + "This is a highly compressable text";
+ byte[] message = str.getBytes();
+ TextFrame frame = new TextFrame();
+ frame.setPayload(ByteBuffer.wrap(message));
+ deflateExtension.encodeFrame(frame);
+ deflateExtension.decodeFrame(frame);
+ assertArrayEquals(message, frame.getPayloadData().array());
+ }
+
+ @Test
+ public void testEncodeFrame() {
+ PerMessageDeflateExtension deflateExtension = new PerMessageDeflateExtension();
+ String str = "This is a highly compressable text"
+ + "This is a highly compressable text"
+ + "This is a highly compressable text"
+ + "This is a highly compressable text"
+ + "This is a highly compressable text";
+ byte[] message = str.getBytes();
+ TextFrame frame = new TextFrame();
+ frame.setPayload(ByteBuffer.wrap(message));
+ deflateExtension.encodeFrame(frame);
+ assertTrue(message.length > frame.getPayloadData().array().length);
+ }
+
+ @Test
+ public void testAcceptProvidedExtensionAsServer() {
+ PerMessageDeflateExtension deflateExtension = new PerMessageDeflateExtension();
+ assertTrue(deflateExtension.acceptProvidedExtensionAsServer("permessage-deflate"));
+ assertTrue(deflateExtension.acceptProvidedExtensionAsServer("some-other-extension, permessage-deflate"));
+ assertFalse(deflateExtension.acceptProvidedExtensionAsServer("wrong-permessage-deflate"));
+ }
+
+ @Test
+ public void testAcceptProvidedExtensionAsClient() {
+ PerMessageDeflateExtension deflateExtension = new PerMessageDeflateExtension();
+ assertTrue(deflateExtension.acceptProvidedExtensionAsClient("permessage-deflate"));
+ assertTrue(deflateExtension.acceptProvidedExtensionAsClient("some-other-extension, permessage-deflate"));
+ assertFalse(deflateExtension.acceptProvidedExtensionAsClient("wrong-permessage-deflate"));
+ }
+
+ @Test
+ public void testIsFrameValid() {
+ PerMessageDeflateExtension deflateExtension = new PerMessageDeflateExtension();
+ TextFrame frame = new TextFrame();
+ try {
+ deflateExtension.isFrameValid(frame);
+ fail("Frame not valid. RSV1 must be set.");
+ } catch (Exception e) {
+ //
+ }
+ frame.setRSV1(true);
+ try {
+ deflateExtension.isFrameValid(frame);
+ } catch (Exception e) {
+ fail("Frame is valid.");
+ }
+ frame.setRSV2(true);
+ try {
+ deflateExtension.isFrameValid(frame);
+ fail("Only RSV1 bit must be set.");
+ } catch (Exception e) {
+ //
+ }
+ ContinuousFrame contFrame = new ContinuousFrame();
+ contFrame.setRSV1(true);
+ try {
+ deflateExtension.isFrameValid(contFrame);
+ fail("RSV1 must only be set for first fragments.Continuous frames can't have RSV1 bit set.");
+ } catch (Exception e) {
+ //
+ }
+ contFrame.setRSV1(false);
+ try {
+ deflateExtension.isFrameValid(contFrame);
+ } catch (Exception e) {
+ fail("Continuous frame is valid.");
+ }
+ }
+
+ @Test
+ public void testGetProvidedExtensionAsClient() {
+ PerMessageDeflateExtension deflateExtension = new PerMessageDeflateExtension();
+ assertEquals( "permessage-deflate", deflateExtension.getProvidedExtensionAsClient() );
+ }
+
+ @Test
+ public void testGetProvidedExtensionAsServer() {
+ PerMessageDeflateExtension deflateExtension = new PerMessageDeflateExtension();
+ assertEquals( "permessage-deflate", deflateExtension.getProvidedExtensionAsServer() );
+ }
+
+ @Test
+ public void testToString() throws Exception {
+ PerMessageDeflateExtension deflateExtension = new PerMessageDeflateExtension();
+ assertEquals( "PerMessageDeflateExtension", deflateExtension.toString() );
+ }
+}
\ No newline at end of file
From 66f07a0d428380d56c87c1f7d217b841b21715c7 Mon Sep 17 00:00:00 2001
From: haruntuncay
+ ![]()
+
+
+
+ Pass
+ Test case was executed and passed successfully.
+
+
+ Non-Strict
+ Test case was executed and passed non-strictly.
+ A non-strict behavior is one that does not adhere to a SHOULD-behavior as described in the protocol specification or
+ a well-defined, canonical behavior that appears to be desirable but left open in the protocol specification.
+ An implementation with non-strict behavior is still conformant to the protocol specification.
+
+
+ Fail
+ Test case was executed and failed. An implementation which fails a test case - other
+ than a performance/limits related one - is non-conforming to a MUST-behavior as described in the protocol specification.
+
+
+ Info
+ Informational test case which detects certain implementation behavior left unspecified by the spec
+ but nevertheless potentially interesting to implementors.
+
+
+ Missing
+ Test case is missing, either because it was skipped via the test suite configuration
+ or deactivated, i.e. because the implementation does not implement the tested feature or breaks during running
+ the test case.
+
+
+
+
+ 1 Framing
+ TooTallNate Java-WebSocket
+
+
+ 1.1 Text Messages
+
+
+ Case 1.1.1
+ Missing
+
+
+ Case 1.1.2
+ Missing
+
+
+ Case 1.1.3
+ Missing
+
+
+ Case 1.1.4
+ Missing
+
+
+ Case 1.1.5
+ Missing
+
+
+ Case 1.1.6
+ Missing
+
+
+ Case 1.1.7
+ Missing
+
+
+ Case 1.1.8
+ Missing
+
+
+ 1 Framing
+ TooTallNate Java-WebSocket
+
+
+ 1.2 Binary Messages
+
+
+ Case 1.2.1
+ Missing
+
+
+ Case 1.2.2
+ Missing
+
+
+ Case 1.2.3
+ Missing
+
+
+ Case 1.2.4
+ Missing
+
+
+ Case 1.2.5
+ Missing
+
+
+ Case 1.2.6
+ Missing
+
+
+ Case 1.2.7
+ Missing
+
+
+ Case 1.2.8
+ Missing
+
+
+ 2 Pings/Pongs
+ TooTallNate Java-WebSocket
+
+
+ Case 2.1
+ Missing
+
+
+ Case 2.2
+ Missing
+
+
+ Case 2.3
+ Missing
+
+
+ Case 2.4
+ Missing
+
+
+ Case 2.5
+ Missing
+
+
+ Case 2.6
+ Missing
+
+
+ Case 2.7
+ Missing
+
+
+ Case 2.8
+ Missing
+
+
+ Case 2.9
+ Missing
+
+
+ Case 2.10
+ Missing
+
+
+ Case 2.11
+ Missing
+
+
+ 3 Reserved Bits
+ TooTallNate Java-WebSocket
+
+
+ Case 3.1
+ Missing
+
+
+ Case 3.2
+ Missing
+
+
+ Case 3.3
+ Missing
+
+
+ Case 3.4
+ Missing
+
+
+ Case 3.5
+ Missing
+
+
+ Case 3.6
+ Missing
+
+
+ Case 3.7
+ Missing
+
+
+ 4 Opcodes
+ TooTallNate Java-WebSocket
+
+
+ 4.1 Non-control Opcodes
+
+
+ Case 4.1.1
+ Missing
+
+
+ Case 4.1.2
+ Missing
+
+
+ Case 4.1.3
+ Missing
+
+
+ Case 4.1.4
+ Missing
+
+
+ Case 4.1.5
+ Missing
+
+
+ 4 Opcodes
+ TooTallNate Java-WebSocket
+
+
+ 4.2 Control Opcodes
+
+
+ Case 4.2.1
+ Missing
+
+
+ Case 4.2.2
+ Missing
+
+
+ Case 4.2.3
+ Missing
+
+
+ Case 4.2.4
+ Missing
+
+
+ Case 4.2.5
+ Missing
+
+
+ 5 Fragmentation
+ TooTallNate Java-WebSocket
+
+
+ Case 5.1
+ Missing
+
+
+ Case 5.2
+ Missing
+
+
+ Case 5.3
+ Missing
+
+
+ Case 5.4
+ Missing
+
+
+ Case 5.5
+ Missing
+
+
+ Case 5.6
+ Missing
+
+
+ Case 5.7
+ Missing
+
+
+ Case 5.8
+ Missing
+
+
+ Case 5.9
+ Missing
+
+
+ Case 5.10
+ Missing
+
+
+ Case 5.11
+ Missing
+
+
+ Case 5.12
+ Missing
+
+
+ Case 5.13
+ Missing
+
+
+ Case 5.14
+ Missing
+
+
+ Case 5.15
+ Missing
+
+
+ Case 5.16
+ Missing
+
+
+ Case 5.17
+ Missing
+
+
+ Case 5.18
+ Missing
+
+
+ Case 5.19
+ Missing
+
+
+ Case 5.20
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.1 Valid UTF-8 with zero payload fragments
+
+
+ Case 6.1.1
+ Missing
+
+
+ Case 6.1.2
+ Missing
+
+
+ Case 6.1.3
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.2 Valid UTF-8 unfragmented, fragmented on code-points and within code-points
+
+
+ Case 6.2.1
+ Missing
+
+
+ Case 6.2.2
+ Missing
+
+
+ Case 6.2.3
+ Missing
+
+
+ Case 6.2.4
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.3 Invalid UTF-8 differently fragmented
+
+
+ Case 6.3.1
+ Missing
+
+
+ Case 6.3.2
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.4 Fail-fast on invalid UTF-8
+
+
+ Case 6.4.1
+ Missing
+
+
+ Case 6.4.2
+ Missing
+
+
+ Case 6.4.3
+ Missing
+
+
+ Case 6.4.4
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.5 Some valid UTF-8 sequences
+
+
+ Case 6.5.1
+ Missing
+
+
+ Case 6.5.2
+ Missing
+
+
+ Case 6.5.3
+ Missing
+
+
+ Case 6.5.4
+ Missing
+
+
+ Case 6.5.5
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.6 All prefixes of a valid UTF-8 string that contains multi-byte code points
+
+
+ Case 6.6.1
+ Missing
+
+
+ Case 6.6.2
+ Missing
+
+
+ Case 6.6.3
+ Missing
+
+
+ Case 6.6.4
+ Missing
+
+
+ Case 6.6.5
+ Missing
+
+
+ Case 6.6.6
+ Missing
+
+
+ Case 6.6.7
+ Missing
+
+
+ Case 6.6.8
+ Missing
+
+
+ Case 6.6.9
+ Missing
+
+
+ Case 6.6.10
+ Missing
+
+
+ Case 6.6.11
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.7 First possible sequence of a certain length
+
+
+ Case 6.7.1
+ Missing
+
+
+ Case 6.7.2
+ Missing
+
+
+ Case 6.7.3
+ Missing
+
+
+ Case 6.7.4
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.8 First possible sequence length 5/6 (invalid codepoints)
+
+
+ Case 6.8.1
+ Missing
+
+
+ Case 6.8.2
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.9 Last possible sequence of a certain length
+
+
+ Case 6.9.1
+ Missing
+
+
+ Case 6.9.2
+ Missing
+
+
+ Case 6.9.3
+ Missing
+
+
+ Case 6.9.4
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.10 Last possible sequence length 4/5/6 (invalid codepoints)
+
+
+ Case 6.10.1
+ Missing
+
+
+ Case 6.10.2
+ Missing
+
+
+ Case 6.10.3
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.11 Other boundary conditions
+
+
+ Case 6.11.1
+ Missing
+
+
+ Case 6.11.2
+ Missing
+
+
+ Case 6.11.3
+ Missing
+
+
+ Case 6.11.4
+ Missing
+
+
+ Case 6.11.5
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.12 Unexpected continuation bytes
+
+
+ Case 6.12.1
+ Missing
+
+
+ Case 6.12.2
+ Missing
+
+
+ Case 6.12.3
+ Missing
+
+
+ Case 6.12.4
+ Missing
+
+
+ Case 6.12.5
+ Missing
+
+
+ Case 6.12.6
+ Missing
+
+
+ Case 6.12.7
+ Missing
+
+
+ Case 6.12.8
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.13 Lonely start characters
+
+
+ Case 6.13.1
+ Missing
+
+
+ Case 6.13.2
+ Missing
+
+
+ Case 6.13.3
+ Missing
+
+
+ Case 6.13.4
+ Missing
+
+
+ Case 6.13.5
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.14 Sequences with last continuation byte missing
+
+
+ Case 6.14.1
+ Missing
+
+
+ Case 6.14.2
+ Missing
+
+
+ Case 6.14.3
+ Missing
+
+
+ Case 6.14.4
+ Missing
+
+
+ Case 6.14.5
+ Missing
+
+
+ Case 6.14.6
+ Missing
+
+
+ Case 6.14.7
+ Missing
+
+
+ Case 6.14.8
+ Missing
+
+
+ Case 6.14.9
+ Missing
+
+
+ Case 6.14.10
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.15 Concatenation of incomplete sequences
+
+
+ Case 6.15.1
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.16 Impossible bytes
+
+
+ Case 6.16.1
+ Missing
+
+
+ Case 6.16.2
+ Missing
+
+
+ Case 6.16.3
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.17 Examples of an overlong ASCII character
+
+
+ Case 6.17.1
+ Missing
+
+
+ Case 6.17.2
+ Missing
+
+
+ Case 6.17.3
+ Missing
+
+
+ Case 6.17.4
+ Missing
+
+
+ Case 6.17.5
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.18 Maximum overlong sequences
+
+
+ Case 6.18.1
+ Missing
+
+
+ Case 6.18.2
+ Missing
+
+
+ Case 6.18.3
+ Missing
+
+
+ Case 6.18.4
+ Missing
+
+
+ Case 6.18.5
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.19 Overlong representation of the NUL character
+
+
+ Case 6.19.1
+ Missing
+
+
+ Case 6.19.2
+ Missing
+
+
+ Case 6.19.3
+ Missing
+
+
+ Case 6.19.4
+ Missing
+
+
+ Case 6.19.5
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.20 Single UTF-16 surrogates
+
+
+ Case 6.20.1
+ Missing
+
+
+ Case 6.20.2
+ Missing
+
+
+ Case 6.20.3
+ Missing
+
+
+ Case 6.20.4
+ Missing
+
+
+ Case 6.20.5
+ Missing
+
+
+ Case 6.20.6
+ Missing
+
+
+ Case 6.20.7
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.21 Paired UTF-16 surrogates
+
+
+ Case 6.21.1
+ Missing
+
+
+ Case 6.21.2
+ Missing
+
+
+ Case 6.21.3
+ Missing
+
+
+ Case 6.21.4
+ Missing
+
+
+ Case 6.21.5
+ Missing
+
+
+ Case 6.21.6
+ Missing
+
+
+ Case 6.21.7
+ Missing
+
+
+ Case 6.21.8
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.22 Non-character code points (valid UTF-8)
+
+
+ Case 6.22.1
+ Missing
+
+
+ Case 6.22.2
+ Missing
+
+
+ Case 6.22.3
+ Missing
+
+
+ Case 6.22.4
+ Missing
+
+
+ Case 6.22.5
+ Missing
+
+
+ Case 6.22.6
+ Missing
+
+
+ Case 6.22.7
+ Missing
+
+
+ Case 6.22.8
+ Missing
+
+
+ Case 6.22.9
+ Missing
+
+
+ Case 6.22.10
+ Missing
+
+
+ Case 6.22.11
+ Missing
+
+
+ Case 6.22.12
+ Missing
+
+
+ Case 6.22.13
+ Missing
+
+
+ Case 6.22.14
+ Missing
+
+
+ Case 6.22.15
+ Missing
+
+
+ Case 6.22.16
+ Missing
+
+
+ Case 6.22.17
+ Missing
+
+
+ Case 6.22.18
+ Missing
+
+
+ Case 6.22.19
+ Missing
+
+
+ Case 6.22.20
+ Missing
+
+
+ Case 6.22.21
+ Missing
+
+
+ Case 6.22.22
+ Missing
+
+
+ Case 6.22.23
+ Missing
+
+
+ Case 6.22.24
+ Missing
+
+
+ Case 6.22.25
+ Missing
+
+
+ Case 6.22.26
+ Missing
+
+
+ Case 6.22.27
+ Missing
+
+
+ Case 6.22.28
+ Missing
+
+
+ Case 6.22.29
+ Missing
+
+
+ Case 6.22.30
+ Missing
+
+
+ Case 6.22.31
+ Missing
+
+
+ Case 6.22.32
+ Missing
+
+
+ Case 6.22.33
+ Missing
+
+
+ Case 6.22.34
+ Missing
+
+
+ 6 UTF-8 Handling
+ TooTallNate Java-WebSocket
+
+
+ 6.23 Unicode specials (i.e. replacement char)
+
+
+ Case 6.23.1
+ Missing
+
+
+ Case 6.23.2
+ Missing
+
+
+ Case 6.23.3
+ Missing
+
+
+ Case 6.23.4
+ Missing
+
+
+ Case 6.23.5
+ Missing
+
+
+ Case 6.23.6
+ Missing
+
+
+ Case 6.23.7
+ Missing
+
+
+ 7 Close Handling
+ TooTallNate Java-WebSocket
+
+
+ 7.1 Basic close behavior (fuzzer initiated)
+
+
+ Case 7.1.1
+ Missing
+
+
+ Case 7.1.2
+ Missing
+
+
+ Case 7.1.3
+ Missing
+
+
+ Case 7.1.4
+ Missing
+
+
+ Case 7.1.5
+ Missing
+
+
+ Case 7.1.6
+ Missing
+
+
+ 7 Close Handling
+ TooTallNate Java-WebSocket
+
+
+ 7.3 Close frame structure: payload length (fuzzer initiated)
+
+
+ Case 7.3.1
+ Missing
+
+
+ Case 7.3.2
+ Missing
+
+
+ Case 7.3.3
+ Missing
+
+
+ Case 7.3.4
+ Missing
+
+
+ Case 7.3.5
+ Missing
+
+
+ Case 7.3.6
+ Missing
+
+
+ 7 Close Handling
+ TooTallNate Java-WebSocket
+
+
+ 7.5 Close frame structure: payload value (fuzzer initiated)
+
+
+ Case 7.5.1
+ Missing
+
+
+ 7 Close Handling
+ TooTallNate Java-WebSocket
+
+
+ 7.7 Close frame structure: valid close codes (fuzzer initiated)
+
+
+ Case 7.7.1
+ Missing
+
+
+ Case 7.7.2
+ Missing
+
+
+ Case 7.7.3
+ Missing
+
+
+ Case 7.7.4
+ Missing
+
+
+ Case 7.7.5
+ Missing
+
+
+ Case 7.7.6
+ Missing
+
+
+ Case 7.7.7
+ Missing
+
+
+ Case 7.7.8
+ Missing
+
+
+ Case 7.7.9
+ Missing
+
+
+ Case 7.7.10
+ Missing
+
+
+ Case 7.7.11
+ Missing
+
+
+ Case 7.7.12
+ Missing
+
+
+ Case 7.7.13
+ Missing
+
+
+ 7 Close Handling
+ TooTallNate Java-WebSocket
+
+
+ 7.9 Close frame structure: invalid close codes (fuzzer initiated)
+
+
+ Case 7.9.1
+ Missing
+
+
+ Case 7.9.2
+ Missing
+
+
+ Case 7.9.3
+ Missing
+
+
+ Case 7.9.4
+ Missing
+
+
+ Case 7.9.5
+ Missing
+
+
+ Case 7.9.6
+ Missing
+
+
+ Case 7.9.7
+ Missing
+
+
+ Case 7.9.8
+ Missing
+
+
+ Case 7.9.9
+ Missing
+
+
+ 7 Close Handling
+ TooTallNate Java-WebSocket
+
+
+ 7.13 Informational close information (fuzzer initiated)
+
+
+ Case 7.13.1
+ Missing
+
+
+ Case 7.13.2
+ Missing
+
+
+ 9 Limits/Performance
+ TooTallNate Java-WebSocket
+
+
+ 9.1 Text Message (increasing size)
+
+
+ Case 9.1.1
+ Missing
+
+
+ Case 9.1.2
+ Missing
+
+
+ Case 9.1.3
+ Missing
+
+
+ Case 9.1.4
+ Missing
+
+
+ Case 9.1.5
+ Missing
+
+
+ Case 9.1.6
+ Missing
+
+
+ 9 Limits/Performance
+ TooTallNate Java-WebSocket
+
+
+ 9.2 Binary Message (increasing size)
+
+
+ Case 9.2.1
+ Missing
+
+
+ Case 9.2.2
+ Missing
+
+
+ Case 9.2.3
+ Missing
+
+
+ Case 9.2.4
+ Missing
+
+
+ Case 9.2.5
+ Missing
+
+
+ Case 9.2.6
+ Missing
+
+
+ 9 Limits/Performance
+ TooTallNate Java-WebSocket
+
+
+ 9.3 Fragmented Text Message (fixed size, increasing fragment size)
+
+
+ Case 9.3.1
+ Missing
+
+
+ Case 9.3.2
+ Missing
+
+
+ Case 9.3.3
+ Missing
+
+
+ Case 9.3.4
+ Missing
+
+
+ Case 9.3.5
+ Missing
+
+
+ Case 9.3.6
+ Missing
+
+
+ Case 9.3.7
+ Missing
+
+
+ Case 9.3.8
+ Missing
+
+
+ Case 9.3.9
+ Missing
+
+
+ 9 Limits/Performance
+ TooTallNate Java-WebSocket
+
+
+ 9.4 Fragmented Binary Message (fixed size, increasing fragment size)
+
+
+ Case 9.4.1
+ Missing
+
+
+ Case 9.4.2
+ Missing
+
+
+ Case 9.4.3
+ Missing
+
+
+ Case 9.4.4
+ Missing
+
+
+ Case 9.4.5
+ Missing
+
+
+ Case 9.4.6
+ Missing
+
+
+ Case 9.4.7
+ Missing
+
+
+ Case 9.4.8
+ Missing
+
+
+ Case 9.4.9
+ Missing
+
+
+ 9 Limits/Performance
+ TooTallNate Java-WebSocket
+
+
+ 9.5 Text Message (fixed size, increasing chop size)
+
+
+ Case 9.5.1
+ Missing
+
+
+ Case 9.5.2
+ Missing
+
+
+ Case 9.5.3
+ Missing
+
+
+ Case 9.5.4
+ Missing
+
+
+ Case 9.5.5
+ Missing
+
+
+ Case 9.5.6
+ Missing
+
+
+ 9 Limits/Performance
+ TooTallNate Java-WebSocket
+
+
+ 9.6 Binary Text Message (fixed size, increasing chop size)
+
+
+ Case 9.6.1
+ Missing
+
+
+ Case 9.6.2
+ Missing
+
+
+ Case 9.6.3
+ Missing
+
+
+ Case 9.6.4
+ Missing
+
+
+ Case 9.6.5
+ Missing
+
+
+ Case 9.6.6
+ Missing
+
+
+ 9 Limits/Performance
+ TooTallNate Java-WebSocket
+
+
+ 9.7 Text Message Roundtrip Time (fixed number, increasing size)
+
+
+ Case 9.7.1
+ Missing
+
+
+ Case 9.7.2
+ Missing
+
+
+ Case 9.7.3
+ Missing
+
+
+ Case 9.7.4
+ Missing
+
+
+ Case 9.7.5
+ Missing
+
+
+ Case 9.7.6
+ Missing
+
+
+ 9 Limits/Performance
+ TooTallNate Java-WebSocket
+
+
+ 9.8 Binary Message Roundtrip Time (fixed number, increasing size)
+
+
+ Case 9.8.1
+ Missing
+
+
+ Case 9.8.2
+ Missing
+
+
+ Case 9.8.3
+ Missing
+
+
+ Case 9.8.4
+ Missing
+
+
+ Case 9.8.5
+ Missing
+
+
+ Case 9.8.6
+ Missing
+
+
+ 10 Misc
+ TooTallNate Java-WebSocket
+
+
+ 10.1 Auto-Fragmentation
+
+
+ Case 10.1.1
+ Missing
+
+
+ 12 WebSocket Compression (different payloads)
+ TooTallNate Java-WebSocket
+
+
+ 12.1 Large JSON data file (utf8, 194056 bytes)
+
+
+ Case 12.1.1
+ Pass
629 ms [1.000/0.985]1000
+
+
+ Case 12.1.2
+ Pass
530 ms [1.000/0.748]1000
+
+
+ Case 12.1.3
+ Pass
580 ms [1.000/0.521]1000
+
+
+ Case 12.1.4
+ Pass
586 ms [1.000/0.170]1000
+
+
+ Case 12.1.5
+ Pass
680 ms [1.000/0.075]1000
+
+
+ Case 12.1.6
+ Pass
743 ms [1.000/0.059]1000
+
+
+ Case 12.1.7
+ Pass
925 ms [1.000/0.051]1000
+
+
+ Case 12.1.8
+ Pass
1399 ms [1.000/0.047]1000
+
+
+ Case 12.1.9
+ Pass
2314 ms [1.000/0.045]1000
+
+
+ Case 12.1.10
+ Pass
4054 ms [1.000/0.044]1000
+
+
+ Case 12.1.11
+ Pass
791 ms [1.000/0.059]1000
+
+
+ Case 12.1.12
+ Pass
1062 ms [1.000/0.051]1000
+
+
+ Case 12.1.13
+ Pass
1434 ms [1.000/0.047]1000
+
+
+ Case 12.1.14
+ Pass
2321 ms [1.000/0.045]1000
+
+
+ Case 12.1.15
+ Pass
4176 ms [1.000/0.044]1000
+
+
+ Case 12.1.16
+ Pass
4347 ms [1.000/0.044]1000
+
+
+ Case 12.1.17
+ Pass
4341 ms [1.000/0.044]1000
+
+
+ Case 12.1.18
+ Pass
3812 ms [1.000/0.044]1000
+
+
+ 12 WebSocket Compression (different payloads)
+ TooTallNate Java-WebSocket
+
+
+ 12.2 Lena Picture, Bitmap 512x512 bw (binary, 263222 bytes)
+
+
+ Case 12.2.1
+ Pass
227 ms [1.000/1.174]1000
+
+
+ Case 12.2.2
+ Pass
267 ms [1.000/1.045]1000
+
+
+ Case 12.2.3
+ Pass
243 ms [1.000/1.008]1000
+
+
+ Case 12.2.4
+ Pass
310 ms [1.000/0.949]1000
+
+
+ Case 12.2.5
+ Pass
426 ms [1.000/0.889]1000
+
+
+ Case 12.2.6
+ Pass
609 ms [1.000/0.873]1000
+
+
+ Case 12.2.7
+ Pass
943 ms [1.000/0.865]1000
+
+
+ Case 12.2.8
+ Pass
1781 ms [1.000/0.860]1000
+
+
+ Case 12.2.9
+ Pass
3846 ms [1.000/0.855]1000
+
+
+ Case 12.2.10
+ Pass
8088 ms [1.000/0.853]1000
+
+
+ Case 12.2.11
+ Pass
931 ms [1.000/0.873]1000
+
+
+ Case 12.2.12
+ Pass
1584 ms [1.000/0.865]1000
+
+
+ Case 12.2.13
+ Pass
2828 ms [1.000/0.860]1000
+
+
+ Case 12.2.14
+ Pass
5984 ms [1.000/0.855]1000
+
+
+ Case 12.2.15
+ Pass
12014 ms [1.000/0.853]1000
+
+
+ Case 12.2.16
+ Pass
9343 ms [1.000/0.853]1000
+
+
+ Case 12.2.17
+ Pass
8312 ms [1.000/0.853]1000
+
+
+ Case 12.2.18
+ Pass
7942 ms [1.000/0.853]1000
+
+
+ 12 WebSocket Compression (different payloads)
+ TooTallNate Java-WebSocket
+
+
+ 12.3 Human readable text, Goethe's Faust I (German) (binary, 222218 bytes)
+
+
+ Case 12.3.1
+ Pass
215 ms [1.000/1.122]1000
+
+
+ Case 12.3.2
+ Pass
221 ms [1.000/0.976]1000
+
+
+ Case 12.3.3
+ Pass
258 ms [1.000/0.725]1000
+
+
+ Case 12.3.4
+ Pass
291 ms [1.000/0.564]1000
+
+
+ Case 12.3.5
+ Pass
437 ms [1.000/0.481]1000
+
+
+ Case 12.3.6
+ Pass
693 ms [1.000/0.453]1000
+
+
+ Case 12.3.7
+ Pass
1220 ms [1.000/0.432]1000
+
+
+ Case 12.3.8
+ Pass
2539 ms [1.000/0.415]1000
+
+
+ Case 12.3.9
+ Pass
5329 ms [1.000/0.401]1000
+
+
+ Case 12.3.10
+ Pass
10841 ms [1.000/0.393]1000
+
+
+ Case 12.3.11
+ Pass
967 ms [1.000/0.453]1000
+
+
+ Case 12.3.12
+ Pass
1545 ms [1.000/0.432]1000
+
+
+ Case 12.3.13
+ Pass
3089 ms [1.000/0.415]1000
+
+
+ Case 12.3.14
+ Pass
6436 ms [1.000/0.401]1000
+
+
+ Case 12.3.15
+ Pass
13066 ms [1.000/0.393]1000
+
+
+ Case 12.3.16
+ Pass
11125 ms [1.000/0.393]1000
+
+
+ Case 12.3.17
+ Pass
11066 ms [1.000/0.393]1000
+
+
+ Case 12.3.18
+ Pass
11809 ms [1.000/0.393]1000
+
+
+ 12 WebSocket Compression (different payloads)
+ TooTallNate Java-WebSocket
+
+
+ 12.4 Large HTML file (utf8, 263527 bytes)
+
+
+ Case 12.4.1
+ Pass
598 ms [1.000/1.048]1000
+
+
+ Case 12.4.2
+ Pass
602 ms [1.000/0.832]1000
+
+
+ Case 12.4.3
+ Pass
619 ms [1.000/0.623]1000
+
+
+ Case 12.4.4
+ Pass
614 ms [1.000/0.262]1000
+
+
+ Case 12.4.5
+ Pass
734 ms [1.000/0.112]1000
+
+
+ Case 12.4.6
+ Pass
846 ms [1.000/0.083]1000
+
+
+ Case 12.4.7
+ Pass
1017 ms [1.000/0.069]1000
+
+
+ Case 12.4.8
+ Pass
1381 ms [1.000/0.061]1000
+
+
+ Case 12.4.9
+ Pass
2304 ms [1.000/0.058]1000
+
+
+ Case 12.4.10
+ Pass
4112 ms [1.000/0.057]1000
+
+
+ Case 12.4.11
+ Pass
904 ms [1.000/0.083]1000
+
+
+ Case 12.4.12
+ Pass
1042 ms [1.000/0.069]1000
+
+
+ Case 12.4.13
+ Pass
1542 ms [1.000/0.061]1000
+
+
+ Case 12.4.14
+ Pass
2577 ms [1.000/0.058]1000
+
+
+ Case 12.4.15
+ Pass
4434 ms [1.000/0.057]1000
+
+
+ Case 12.4.16
+ Pass
4285 ms [1.000/0.057]1000
+
+
+ Case 12.4.17
+ Pass
4446 ms [1.000/0.057]1000
+
+
+ Case 12.4.18
+ Pass
4198 ms [1.000/0.057]1000
+
+
+ 12 WebSocket Compression (different payloads)
+ TooTallNate Java-WebSocket
+
+
+ 12.5 A larger PDF (binary, 1042328 bytes)
+
+
+ Case 12.5.1
+ Pass
210 ms [1.000/1.175]1000
+
+
+ Case 12.5.2
+ Pass
238 ms [1.000/1.074]1000
+
+
+ Case 12.5.3
+ Pass
298 ms [1.000/1.004]1000
+
+
+ Case 12.5.4
+ Pass
305 ms [1.000/0.900]1000
+
+
+ Case 12.5.5
+ Pass
407 ms [1.000/0.855]1000
+
+
+ Case 12.5.6
+ Pass
550 ms [1.000/0.819]1000
+
+
+ Case 12.5.7
+ Pass
838 ms [1.000/0.793]1000
+
+
+ Case 12.5.8
+ Pass
1633 ms [1.000/0.777]1000
+
+
+ Case 12.5.9
+ Pass
3097 ms [1.000/0.768]1000
+
+
+ Case 12.5.10
+ Pass
6205 ms [1.000/0.763]1000
+
+
+ Case 12.5.11
+ Pass
907 ms [1.000/0.819]1000
+
+
+ Case 12.5.12
+ Pass
1439 ms [1.000/0.793]1000
+
+
+ Case 12.5.13
+ Pass
2418 ms [1.000/0.777]1000
+
+
+ Case 12.5.14
+ Pass
4615 ms [1.000/0.768]1000
+
+
+ Case 12.5.15
+ Pass
9603 ms [1.000/0.763]1000
+
+
+ Case 12.5.16
+ Pass
7019 ms [1.000/0.763]1000
+
+
+ Case 12.5.17
+ Pass
6347 ms [1.000/0.763]1000
+
+
+ Case 12.5.18
+ Pass
6237 ms [1.000/0.763]1000
+
+
+ 13 WebSocket Compression (different parameters)
+ TooTallNate Java-WebSocket
+
+
+ 13.1 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
+
+
+ Case 13.1.1
+ Pass
477 ms [1.000/0.985]1000
+
+
+ Case 13.1.2
+ Pass
521 ms [1.000/0.748]1000
+
+
+ Case 13.1.3
+ Pass
544 ms [1.000/0.521]1000
+
+
+ Case 13.1.4
+ Pass
525 ms [1.000/0.170]1000
+
+
+ Case 13.1.5
+ Pass
650 ms [1.000/0.075]1000
+
+
+ Case 13.1.6
+ Pass
745 ms [1.000/0.059]1000
+
+
+ Case 13.1.7
+ Pass
939 ms [1.000/0.051]1000
+
+
+ Case 13.1.8
+ Pass
1324 ms [1.000/0.047]1000
+
+
+ Case 13.1.9
+ Pass
2252 ms [1.000/0.045]1000
+
+
+ Case 13.1.10
+ Pass
3988 ms [1.000/0.044]1000
+
+
+ Case 13.1.11
+ Pass
806 ms [1.000/0.059]1000
+
+
+ Case 13.1.12
+ Pass
977 ms [1.000/0.051]1000
+
+
+ Case 13.1.13
+ Pass
1467 ms [1.000/0.047]1000
+
+
+ Case 13.1.14
+ Pass
2335 ms [1.000/0.045]1000
+
+
+ Case 13.1.15
+ Pass
4039 ms [1.000/0.044]1000
+
+
+ Case 13.1.16
+ Pass
4009 ms [1.000/0.044]1000
+
+
+ Case 13.1.17
+ Pass
4423 ms [1.000/0.044]1000
+
+
+ Case 13.1.18
+ Pass
3806 ms [1.000/0.044]1000
+
+
+ 13 WebSocket Compression (different parameters)
+ TooTallNate Java-WebSocket
+
+
+ 13.2 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
+
+
+ Case 13.2.1
+ Pass
453 ms [1.000/0.985]1000
+
+
+ Case 13.2.2
+ Pass
496 ms [1.000/0.748]1000
+
+
+ Case 13.2.3
+ Pass
492 ms [1.000/0.521]1000
+
+
+ Case 13.2.4
+ Pass
555 ms [1.000/0.170]1000
+
+
+ Case 13.2.5
+ Pass
635 ms [1.000/0.075]1000
+
+
+ Case 13.2.6
+ Pass
711 ms [1.000/0.059]1000
+
+
+ Case 13.2.7
+ Pass
931 ms [1.000/0.051]1000
+
+
+ Case 13.2.8
+ Pass
1270 ms [1.000/0.047]1000
+
+
+ Case 13.2.9
+ Pass
2134 ms [1.000/0.045]1000
+
+
+ Case 13.2.10
+ Pass
3863 ms [1.000/0.044]1000
+
+
+ Case 13.2.11
+ Pass
779 ms [1.000/0.059]1000
+
+
+ Case 13.2.12
+ Pass
973 ms [1.000/0.051]1000
+
+
+ Case 13.2.13
+ Pass
1389 ms [1.000/0.047]1000
+
+
+ Case 13.2.14
+ Pass
2201 ms [1.000/0.045]1000
+
+
+ Case 13.2.15
+ Pass
4032 ms [1.000/0.044]1000
+
+
+ Case 13.2.16
+ Pass
3992 ms [1.000/0.044]1000
+
+
+ Case 13.2.17
+ Pass
4234 ms [1.000/0.044]1000
+
+
+ Case 13.2.18
+ Pass
3847 ms [1.000/0.044]1000
+
+
+ 13 WebSocket Compression (different parameters)
+ TooTallNate Java-WebSocket
+
+
+ 13.3 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
+
+
+ Case 13.3.1
+ Pass
538 ms [1.000/0.985]1000
+
+
+ Case 13.3.2
+ Pass
527 ms [1.000/0.748]1000
+
+
+ Case 13.3.3
+ Pass
495 ms [1.000/0.521]1000
+
+
+ Case 13.3.4
+ Pass
544 ms [1.000/0.170]1000
+
+
+ Case 13.3.5
+ Pass
692 ms [1.000/0.075]1000
+
+
+ Case 13.3.6
+ Pass
750 ms [1.000/0.059]1000
+
+
+ Case 13.3.7
+ Pass
978 ms [1.000/0.051]1000
+
+
+ Case 13.3.8
+ Pass
1316 ms [1.000/0.047]1000
+
+
+ Case 13.3.9
+ Pass
2134 ms [1.000/0.045]1000
+
+
+ Case 13.3.10
+ Pass
3762 ms [1.000/0.044]1000
+
+
+ Case 13.3.11
+ Pass
785 ms [1.000/0.059]1000
+
+
+ Case 13.3.12
+ Pass
987 ms [1.000/0.051]1000
+
+
+ Case 13.3.13
+ Pass
1442 ms [1.000/0.047]1000
+
+
+ Case 13.3.14
+ Pass
2478 ms [1.000/0.045]1000
+
+
+ Case 13.3.15
+ Pass
4157 ms [1.000/0.044]1000
+
+
+ Case 13.3.16
+ Pass
4171 ms [1.000/0.044]1000
+
+
+ Case 13.3.17
+ Pass
4438 ms [1.000/0.044]1000
+
+
+ Case 13.3.18
+ Pass
3711 ms [1.000/0.044]1000
+
+
+ 13 WebSocket Compression (different parameters)
+ TooTallNate Java-WebSocket
+
+
+ 13.4 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
+
+
+ Case 13.4.1
+ Pass
495 ms [1.000/0.985]1000
+
+
+ Case 13.4.2
+ Pass
470 ms [1.000/0.748]1000
+
+
+ Case 13.4.3
+ Pass
493 ms [1.000/0.521]1000
+
+
+ Case 13.4.4
+ Pass
531 ms [1.000/0.170]1000
+
+
+ Case 13.4.5
+ Pass
637 ms [1.000/0.075]1000
+
+
+ Case 13.4.6
+ Pass
719 ms [1.000/0.059]1000
+
+
+ Case 13.4.7
+ Pass
906 ms [1.000/0.051]1000
+
+
+ Case 13.4.8
+ Pass
1281 ms [1.000/0.047]1000
+
+
+ Case 13.4.9
+ Pass
2103 ms [1.000/0.045]1000
+
+
+ Case 13.4.10
+ Pass
3671 ms [1.000/0.044]1000
+
+
+ Case 13.4.11
+ Pass
771 ms [1.000/0.059]1000
+
+
+ Case 13.4.12
+ Pass
976 ms [1.000/0.051]1000
+
+
+ Case 13.4.13
+ Pass
1435 ms [1.000/0.047]1000
+
+
+ Case 13.4.14
+ Pass
2350 ms [1.000/0.045]1000
+
+
+ Case 13.4.15
+ Pass
4051 ms [1.000/0.044]1000
+
+
+ Case 13.4.16
+ Pass
4005 ms [1.000/0.044]1000
+
+
+ Case 13.4.17
+ Pass
4504 ms [1.000/0.044]1000
+
+
+ Case 13.4.18
+ Pass
3954 ms [1.000/0.044]1000
+
+
+ 13 WebSocket Compression (different parameters)
+ TooTallNate Java-WebSocket
+
+
+ 13.5 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
+
+
+ Case 13.5.1
+ Pass
492 ms [1.000/0.985]1000
+
+
+ Case 13.5.2
+ Pass
525 ms [1.000/0.748]1000
+
+
+ Case 13.5.3
+ Pass
590 ms [1.000/0.521]1000
+
+
+ Case 13.5.4
+ Pass
577 ms [1.000/0.170]1000
+
+
+ Case 13.5.5
+ Pass
722 ms [1.000/0.075]1000
+
+
+ Case 13.5.6
+ Pass
816 ms [1.000/0.059]1000
+
+
+ Case 13.5.7
+ Pass
978 ms [1.000/0.051]1000
+
+
+ Case 13.5.8
+ Pass
1320 ms [1.000/0.047]1000
+
+
+ Case 13.5.9
+ Pass
2182 ms [1.000/0.045]1000
+
+
+ Case 13.5.10
+ Pass
3981 ms [1.000/0.044]1000
+
+
+ Case 13.5.11
+ Pass
823 ms [1.000/0.059]1000
+
+
+ Case 13.5.12
+ Pass
1042 ms [1.000/0.051]1000
+
+
+ Case 13.5.13
+ Pass
1456 ms [1.000/0.047]1000
+
+
+ Case 13.5.14
+ Pass
2339 ms [1.000/0.045]1000
+
+
+ Case 13.5.15
+ Pass
4093 ms [1.000/0.044]1000
+
+
+ Case 13.5.16
+ Pass
3879 ms [1.000/0.044]1000
+
+
+ Case 13.5.17
+ Pass
4201 ms [1.000/0.044]1000
+
+
+ Case 13.5.18
+ Pass
3777 ms [1.000/0.044]1000
+
+
+ 13 WebSocket Compression (different parameters)
+ TooTallNate Java-WebSocket
+
+
+ 13.6 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
+
+
+ Case 13.6.1
+ Pass
486 ms [1.000/0.985]1000
+
+
+ Case 13.6.2
+ Pass
519 ms [1.000/0.748]1000
+
+
+ Case 13.6.3
+ Pass
535 ms [1.000/0.521]1000
+
+
+ Case 13.6.4
+ Pass
543 ms [1.000/0.170]1000
+
+
+ Case 13.6.5
+ Pass
653 ms [1.000/0.075]1000
+
+
+ Case 13.6.6
+ Pass
712 ms [1.000/0.059]1000
+
+
+ Case 13.6.7
+ Pass
918 ms [1.000/0.051]1000
+
+
+ Case 13.6.8
+ Pass
1285 ms [1.000/0.047]1000
+
+
+ Case 13.6.9
+ Pass
2166 ms [1.000/0.045]1000
+
+
+ Case 13.6.10
+ Pass
3698 ms [1.000/0.044]1000
+
+
+ Case 13.6.11
+ Pass
773 ms [1.000/0.059]1000
+
+
+ Case 13.6.12
+ Pass
978 ms [1.000/0.051]1000
+
+
+ Case 13.6.13
+ Pass
1363 ms [1.000/0.047]1000
+
+
+ Case 13.6.14
+ Pass
2362 ms [1.000/0.045]1000
+
+
+ Case 13.6.15
+ Pass
4349 ms [1.000/0.044]1000
+
+
+ Case 13.6.16
+ Pass
4305 ms [1.000/0.044]1000
+
+
+ Case 13.6.17
+ Pass
4359 ms [1.000/0.044]1000
+
+
+ Case 13.6.18
+ Pass
4246 ms [1.000/0.044]1000
+
+
+ 13 WebSocket Compression (different parameters)
+ TooTallNate Java-WebSocket
+
+
+ 13.7 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
+
+
+ Case 13.7.1
+ Pass
612 ms [1.000/0.985]1000
+
+
+ Case 13.7.2
+ Pass
485 ms [1.000/0.748]1000
+
+
+ Case 13.7.3
+ Pass
537 ms [1.000/0.521]1000
+
+
+ Case 13.7.4
+ Pass
558 ms [1.000/0.170]1000
+
+
+ Case 13.7.5
+ Pass
870 ms [1.000/0.075]1000
+
+
+ Case 13.7.6
+ Pass
842 ms [1.000/0.059]1000
+
+
+ Case 13.7.7
+ Pass
1134 ms [1.000/0.051]1000
+
+
+ Case 13.7.8
+ Pass
1285 ms [1.000/0.047]1000
+
+
+ Case 13.7.9
+ Pass
2269 ms [1.000/0.045]1000
+
+
+ Case 13.7.10
+ Pass
3975 ms [1.000/0.044]1000
+
+
+ Case 13.7.11
+ Pass
960 ms [1.000/0.059]1000
+
+
+ Case 13.7.12
+ Pass
1079 ms [1.000/0.051]1000
+
+
+ Case 13.7.13
+ Pass
1434 ms [1.000/0.047]1000
+
+
+ Case 13.7.14
+ Pass
2523 ms [1.000/0.045]1000
+
+
+ Case 13.7.15
+ Pass
4308 ms [1.000/0.044]1000
+
+
+ Case 13.7.16
+ Pass
4000 ms [1.000/0.044]1000
+
+
+ Case 13.7.17
+ Pass
4446 ms [1.000/0.044]1000
+
+
+ Case 13.7.18
+ Pass
3730 ms [1.000/0.044]1000
+
+
+
+ Case 1.1.1
+ Up
+
Send text message with payload 0.
Receive echo'ed text message (with empty payload). Clean close with normal code.
+
+ Case 1.1.2
+ Up
+
Send text message message with payload of length 125.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
+
+ Case 1.1.3
+ Up
+
Send text message message with payload of length 126.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
+
+ Case 1.1.4
+ Up
+
Send text message message with payload of length 127.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
+
+ Case 1.1.5
+ Up
+
Send text message message with payload of length 128.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
+
+ Case 1.1.6
+ Up
+
Send text message message with payload of length 65535.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
+
+ Case 1.1.7
+ Up
+
Send text message message with payload of length 65536.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
+
+ Case 1.1.8
+ Up
+
Send text message message with payload of length 65536. Sent out data in chops of 997 octets.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
+
+ Case 1.2.1
+ Up
+
Send binary message with payload 0.
Receive echo'ed binary message (with empty payload). Clean close with normal code.
+
+ Case 1.2.2
+ Up
+
Send binary message message with payload of length 125.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
+
+ Case 1.2.3
+ Up
+
Send binary message message with payload of length 126.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
+
+ Case 1.2.4
+ Up
+
Send binary message message with payload of length 127.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
+
+ Case 1.2.5
+ Up
+
Send binary message message with payload of length 128.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
+
+ Case 1.2.6
+ Up
+
Send binary message message with payload of length 65535.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
+
+ Case 1.2.7
+ Up
+
Send binary message message with payload of length 65536.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
+
+ Case 1.2.8
+ Up
+
Send binary message message with payload of length 65536. Sent out data in chops of 997 octets.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
+
+ Case 2.1
+ Up
+
Send ping without payload.
Pong (with empty payload) is sent in reply to Ping. Clean close with normal code.
+
+ Case 2.2
+ Up
+
Send ping with small text payload.
Pong with payload echo'ed is sent in reply to Ping. Clean close with normal code.
+
+ Case 2.3
+ Up
+
Send ping with small binary (non UTF-8) payload.
Pong with payload echo'ed is sent in reply to Ping. Clean close with normal code.
+
+ Case 2.4
+ Up
+
Send ping with binary payload of 125 octets.
Pong with payload echo'ed is sent in reply to Ping. Clean close with normal code.
+
+ Case 2.5
+ Up
+
Send ping with binary payload of 126 octets.
Connection is failed immediately (1002/Protocol Error), since control frames are only allowed to have payload up to and including 125 octets..
+
+ Case 2.6
+ Up
+
Send ping with binary payload of 125 octets, send in octet-wise chops.
Pong with payload echo'ed is sent in reply to Ping. Implementations must be TCP clean. Clean close with normal code.
+
+ Case 2.7
+ Up
+
Send unsolicited pong without payload. Verify nothing is received. Clean close with normal code.
Nothing.
+
+ Case 2.8
+ Up
+
Send unsolicited pong with payload. Verify nothing is received. Clean close with normal code.
Nothing.
+
+ Case 2.9
+ Up
+
Send unsolicited pong with payload. Send ping with payload. Verify pong for ping is received.
Nothing in reply to own Pong, but Pong with payload echo'ed in reply to Ping. Clean close with normal code.
+
+ Case 2.10
+ Up
+
Send 10 Pings with payload.
Pongs for our Pings with all the payloads. Note: This is not required by the Spec .. but we check for this behaviour anyway. Clean close with normal code.
+
+ Case 2.11
+ Up
+
Send 10 Pings with payload. Send out octets in octet-wise chops.
Pongs for our Pings with all the payloads. Note: This is not required by the Spec .. but we check for this behaviour anyway. Clean close with normal code.
+
+ Case 3.1
+ Up
+
Send small text message with RSV = 1.
The connection is failed immediately (1002/protocol error), since RSV must be 0, when no extension defining RSV meaning has been negotiated.
+
+ Case 3.2
+ Up
+
Send small text message, then send again with RSV = 2, then send Ping.
Echo for first message is received, but then connection is failed immediately, since RSV must be 0, when no extension defining RSV meaning has been negotiated. The Pong is not received.
+
+ Case 3.3
+ Up
+
Send small text message, then send again with RSV = 3, then send Ping. Octets are sent in frame-wise chops. Octets are sent in octet-wise chops.
Echo for first message is received, but then connection is failed immediately, since RSV must be 0, when no extension defining RSV meaning has been negotiated. The Pong is not received.
+
+ Case 3.4
+ Up
+
Send small text message, then send again with RSV = 4, then send Ping. Octets are sent in octet-wise chops.
Echo for first message is received, but then connection is failed immediately, since RSV must be 0, when no extension defining RSV meaning has been negotiated. The Pong is not received.
+
+ Case 3.5
+ Up
+
Send small binary message with RSV = 5.
The connection is failed immediately, since RSV must be 0.
+
+ Case 3.6
+ Up
+
Send Ping with RSV = 6.
The connection is failed immediately, since RSV must be 0.
+
+ Case 3.7
+ Up
+
Send Close with RSV = 7.
The connection is failed immediately, since RSV must be 0.
+
+ Case 4.1.1
+ Up
+
Send frame with reserved non-control Opcode = 3.
The connection is failed immediately.
+
+ Case 4.1.2
+ Up
+
Send frame with reserved non-control Opcode = 4 and non-empty payload.
The connection is failed immediately.
+
+ Case 4.1.3
+ Up
+
Send small text message, then send frame with reserved non-control Opcode = 5, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
+
+ Case 4.1.4
+ Up
+
Send small text message, then send frame with reserved non-control Opcode = 6 and non-empty payload, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
+
+ Case 4.1.5
+ Up
+
Send small text message, then send frame with reserved non-control Opcode = 7 and non-empty payload, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
+
+ Case 4.2.1
+ Up
+
Send frame with reserved control Opcode = 11.
The connection is failed immediately.
+
+ Case 4.2.2
+ Up
+
Send frame with reserved control Opcode = 12 and non-empty payload.
The connection is failed immediately.
+
+ Case 4.2.3
+ Up
+
Send small text message, then send frame with reserved control Opcode = 13, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
+
+ Case 4.2.4
+ Up
+
Send small text message, then send frame with reserved control Opcode = 14 and non-empty payload, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
+
+ Case 4.2.5
+ Up
+
Send small text message, then send frame with reserved control Opcode = 15 and non-empty payload, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
+
+ Case 5.1
+ Up
+
Send Ping fragmented into 2 fragments.
Connection is failed immediately, since control message MUST NOT be fragmented.
+
+ Case 5.2
+ Up
+
Send Pong fragmented into 2 fragments.
Connection is failed immediately, since control message MUST NOT be fragmented.
+
+ Case 5.3
+ Up
+
Send text Message fragmented into 2 fragments.
Message is processed and echo'ed back to us.
+
+ Case 5.4
+ Up
+
Send text Message fragmented into 2 fragments, octets are sent in frame-wise chops.
Message is processed and echo'ed back to us.
+
+ Case 5.5
+ Up
+
Send text Message fragmented into 2 fragments, octets are sent in octet-wise chops.
Message is processed and echo'ed back to us.
+
+ Case 5.6
+ Up
+
Send text Message fragmented into 2 fragments, one ping with payload in-between.
A pong is received, then the message is echo'ed back to us.
+
+ Case 5.7
+ Up
+
Send text Message fragmented into 2 fragments, one ping with payload in-between. Octets are sent in frame-wise chops.
A pong is received, then the message is echo'ed back to us.
+
+ Case 5.8
+ Up
+
Send text Message fragmented into 2 fragments, one ping with payload in-between. Octets are sent in octet-wise chops.
A pong is received, then the message is echo'ed back to us.
+
+ Case 5.9
+ Up
+
Send unfragmented Text Message after Continuation Frame with FIN = true, where there is nothing to continue, sent in one chop.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.10
+ Up
+
Send unfragmented Text Message after Continuation Frame with FIN = true, where there is nothing to continue, sent in per-frame chops.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.11
+ Up
+
Send unfragmented Text Message after Continuation Frame with FIN = true, where there is nothing to continue, sent in octet-wise chops.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.12
+ Up
+
Send unfragmented Text Message after Continuation Frame with FIN = false, where there is nothing to continue, sent in one chop.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.13
+ Up
+
Send unfragmented Text Message after Continuation Frame with FIN = false, where there is nothing to continue, sent in per-frame chops.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.14
+ Up
+
Send unfragmented Text Message after Continuation Frame with FIN = false, where there is nothing to continue, sent in octet-wise chops.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.15
+ Up
+
Send text Message fragmented into 2 fragments, then Continuation Frame with FIN = false where there is nothing to continue, then unfragmented Text Message, all sent in one chop.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.16
+ Up
+
Repeated 2x: Continuation Frame with FIN = false (where there is nothing to continue), then text Message fragmented into 2 fragments.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.17
+ Up
+
Repeated 2x: Continuation Frame with FIN = true (where there is nothing to continue), then text Message fragmented into 2 fragments.
The connection is failed immediately, since there is no message to continue.
+
+ Case 5.18
+ Up
+
Send text Message fragmented into 2 fragments, with both frame opcodes set to text, sent in one chop.
The connection is failed immediately, since all data frames after the initial data frame must have opcode 0.
+
+ Case 5.19
+ Up
+
A fragmented text message is sent in multiple frames. After
+ sending the first 2 frames of the text message, a Ping is sent. Then we wait 1s,
+ then we send 2 more text fragments, another Ping and then the final text fragment.
+ Everything is legal.
The peer immediately answers the first Ping before
+ it has received the last text message fragment. The peer pong's back the Ping's
+ payload exactly, and echo's the payload of the fragmented message back to us.
+
+ Case 5.20
+ Up
+
Same as Case 5.19, but send all frames with SYNC = True.
+ Note, this does not change the octets sent in any way, only how the stream
+ is chopped up on the wire.
Same as Case 5.19. Implementations must be agnostic to how
+ octet stream is chopped up on wire (must be TCP clean).
+
+ Case 6.1.1
+ Up
+
Send text message of length 0.
A message is echo'ed back to us (with empty payload).
+
+ Case 6.1.2
+ Up
+
Send fragmented text message, 3 fragments each of length 0.
A message is echo'ed back to us (with empty payload).
+
+ Case 6.1.3
+ Up
+
Send fragmented text message, 3 fragments, first and last of length 0, middle non-empty.
A message is echo'ed back to us (with payload = payload of middle fragment).
+
+ Case 6.2.1
+ Up
+
Send a valid UTF-8 text message in one fragment.
MESSAGE:
Hello-µ@ßöäüà á-UTF-8!!
48656c6c6f2dc2b540c39fc3b6c3a4c3bcc3a0c3a12d5554462d382121
The message is echo'ed back to us.
+
+ Case 6.2.2
+ Up
+
Send a valid UTF-8 text message in two fragments, fragmented on UTF-8 code point boundary.
MESSAGE FRAGMENT 1:
Hello-µ@ßöä
48656c6c6f2dc2b540c39fc3b6c3a4
MESSAGE FRAGMENT 2:
üà á-UTF-8!!
c3bcc3a0c3a12d5554462d382121
The message is echo'ed back to us.
+
+ Case 6.2.3
+ Up
+
Send a valid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
Hello-µ@ßöäüà á-UTF-8!!
48656c6c6f2dc2b540c39fc3b6c3a4c3bcc3a0c3a12d5554462d382121
The message is echo'ed back to us.
+
+ Case 6.2.4
+ Up
+
Send a valid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
κόσμε
cebae1bdb9cf83cebcceb5
The message is echo'ed back to us.
+
+ Case 6.3.1
+ Up
+
Send invalid UTF-8 text message unfragmented.
MESSAGE:
cebae1bdb9cf83cebcceb5eda080656469746564
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.3.2
+ Up
+
Send invalid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
cebae1bdb9cf83cebcceb5eda080656469746564
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.4.1
+ Up
+
Send invalid UTF-8 text message in 3 fragments (frames).
+First frame payload is valid, then wait, then 2nd frame which contains the payload making the sequence invalid, then wait, then 3rd frame with rest.
+Note that PART1 and PART3 are valid UTF-8 in themselves, PART2 is a 0x110000 encoded as in the UTF-8 integer encoding scheme, but the codepoint is invalid (out of range).
+
MESSAGE PARTS:
+PART1 = cebae1bdb9cf83cebcceb5
+PART2 = f4908080
+PART3 = 656469746564
+
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
+
+ Case 6.4.2
+ Up
+
Same as Case 6.4.1, but in 2nd frame, we send only up to and including the octet making the complete payload invalid.
+
MESSAGE PARTS:
+PART1 = cebae1bdb9cf83cebcceb5f4
+PART2 = 90
+PART3 = 8080656469746564
+
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
+
+ Case 6.4.3
+ Up
+
Same as Case 6.4.1, but we send message not in 3 frames, but in 3 chops of the same message frame.
+
MESSAGE PARTS:
+PART1 = cebae1bdb9cf83cebcceb5
+PART2 = f4908080
+PART3 = 656469746564
+
The first chop is accepted, we expect to timeout on the first wait. The 2nd chop should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
+
+ Case 6.4.4
+ Up
+
Same as Case 6.4.2, but we send message not in 3 frames, but in 3 chops of the same message frame.
+
MESSAGE PARTS:
+PART1 = cebae1bdb9cf83cebcceb5f4
+PART2 = 90
+PART3 =
+
The first chop is accepted, we expect to timeout on the first wait. The 2nd chop should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
+
+ Case 6.5.1
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x68656c6c6f24776f726c64
The message is echo'ed back to us.
+
+ Case 6.5.2
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x68656c6c6fc2a2776f726c64
The message is echo'ed back to us.
+
+ Case 6.5.3
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x68656c6c6fe282ac776f726c64
The message is echo'ed back to us.
+
+ Case 6.5.4
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x68656c6c6ff0a4ada2776f726c64
The message is echo'ed back to us.
+
+ Case 6.5.5
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83cebcceb5
The message is echo'ed back to us.
+
+ Case 6.6.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xce
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.6.2
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xceba
The message is echo'ed back to us.
+
+ Case 6.6.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.6.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1bd
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.6.5
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9
The message is echo'ed back to us.
+
+ Case 6.6.6
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.6.7
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83
The message is echo'ed back to us.
+
+ Case 6.6.8
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83ce
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.6.9
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83cebc
The message is echo'ed back to us.
+
+ Case 6.6.10
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83cebcce
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.6.11
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83cebcceb5
The message is echo'ed back to us.
+
+ Case 6.7.1
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x00
The message is echo'ed back to us.
+
+ Case 6.7.2
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xc280
The message is echo'ed back to us.
+
+ Case 6.7.3
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xe0a080
The message is echo'ed back to us.
+
+ Case 6.7.4
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0908080
The message is echo'ed back to us.
+
+ Case 6.8.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf888808080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.8.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc8480808080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.9.1
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x7f
The message is echo'ed back to us.
+
+ Case 6.9.2
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xdfbf
The message is echo'ed back to us.
+
+ Case 6.9.3
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbf
The message is echo'ed back to us.
+
+ Case 6.9.4
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf48fbfbf
The message is echo'ed back to us.
+
+ Case 6.10.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf7bfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.10.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfbbfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.10.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfdbfbfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.11.1
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xed9fbf
The message is echo'ed back to us.
+
+ Case 6.11.2
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xee8080
The message is echo'ed back to us.
+
+ Case 6.11.3
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbd
The message is echo'ed back to us.
+
+ Case 6.11.4
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf48fbfbf
The message is echo'ed back to us.
+
+ Case 6.11.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf4908080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.12.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.12.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.12.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.12.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf80
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.12.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf80bf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.12.6
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf80bf80
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.12.7
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf80bf80bf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.12.8
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbe
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.13.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc020c120c220c320c420c520c620c720c820c920ca20cb20cc20cd20ce20cf20d020d120d220d320d420d520d620d720d820d920da20db20dc20dd20de20
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.13.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe020e120e220e320e420e520e620e720e820e920ea20eb20ec20ed20ee20
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.13.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf020f120f220f320f420f520f620
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.13.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf820f920fa20
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.13.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc20
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc0
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf08080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf8808080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc80808080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.6
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xdf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.7
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xefbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.8
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf7bfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.9
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfbbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.14.10
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfdbfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.15.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc0e080f08080f8808080fc80808080dfefbff7bfbffbbfbfbffdbfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.16.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfe
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.16.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xff
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.16.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfefeffff
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.17.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc0af
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.17.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe080af
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.17.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf08080af
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.17.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf8808080af
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.17.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc80808080af
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.18.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc1bf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.18.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe09fbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.18.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf08fbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.18.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf887bfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.18.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc83bfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.19.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.19.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe08080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.19.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf0808080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.19.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf880808080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.19.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc8080808080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.20.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xeda080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.20.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedadbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.20.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedae80
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.20.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedafbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.20.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedb080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.20.6
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedbe80
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.20.7
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.21.1
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xeda080edb080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.21.2
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xeda080edbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.21.3
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedadbfedb080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.21.4
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedadbfedbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.21.5
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedae80edb080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.21.6
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedae80edbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.21.7
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedafbfedb080
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.21.8
+ Up
+
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedafbfedbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
+
+ Case 6.22.1
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbe
The message is echo'ed back to us.
+
+ Case 6.22.2
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbf
The message is echo'ed back to us.
+
+ Case 6.22.3
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf09fbfbe
The message is echo'ed back to us.
+
+ Case 6.22.4
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf09fbfbf
The message is echo'ed back to us.
+
+ Case 6.22.5
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0afbfbe
The message is echo'ed back to us.
+
+ Case 6.22.6
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0afbfbf
The message is echo'ed back to us.
+
+ Case 6.22.7
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0bfbfbe
The message is echo'ed back to us.
+
+ Case 6.22.8
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0bfbfbf
The message is echo'ed back to us.
+
+ Case 6.22.9
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf18fbfbe
The message is echo'ed back to us.
+
+ Case 6.22.10
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf18fbfbf
The message is echo'ed back to us.
+
+ Case 6.22.11
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf19fbfbe
The message is echo'ed back to us.
+
+ Case 6.22.12
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf19fbfbf
The message is echo'ed back to us.
+
+ Case 6.22.13
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf1afbfbe
The message is echo'ed back to us.
+
+ Case 6.22.14
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf1afbfbf
The message is echo'ed back to us.
+
+ Case 6.22.15
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf1bfbfbe
The message is echo'ed back to us.
+
+ Case 6.22.16
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf1bfbfbf
The message is echo'ed back to us.
+
+ Case 6.22.17
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf28fbfbe
The message is echo'ed back to us.
+
+ Case 6.22.18
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf28fbfbf
The message is echo'ed back to us.
+
+ Case 6.22.19
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf29fbfbe
The message is echo'ed back to us.
+
+ Case 6.22.20
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf29fbfbf
The message is echo'ed back to us.
+
+ Case 6.22.21
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf2afbfbe
The message is echo'ed back to us.
+
+ Case 6.22.22
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf2afbfbf
The message is echo'ed back to us.
+
+ Case 6.22.23
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf2bfbfbe
The message is echo'ed back to us.
+
+ Case 6.22.24
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf2bfbfbf
The message is echo'ed back to us.
+
+ Case 6.22.25
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf38fbfbe
The message is echo'ed back to us.
+
+ Case 6.22.26
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf38fbfbf
The message is echo'ed back to us.
+
+ Case 6.22.27
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf39fbfbe
The message is echo'ed back to us.
+
+ Case 6.22.28
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf39fbfbf
The message is echo'ed back to us.
+
+ Case 6.22.29
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf3afbfbe
The message is echo'ed back to us.
+
+ Case 6.22.30
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf3afbfbf
The message is echo'ed back to us.
+
+ Case 6.22.31
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf3bfbfbe
The message is echo'ed back to us.
+
+ Case 6.22.32
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf3bfbfbf
The message is echo'ed back to us.
+
+ Case 6.22.33
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf48fbfbe
The message is echo'ed back to us.
+
+ Case 6.22.34
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf48fbfbf
The message is echo'ed back to us.
+
+ Case 6.23.1
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfb9
The message is echo'ed back to us.
+
+ Case 6.23.2
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfba
The message is echo'ed back to us.
+
+ Case 6.23.3
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbb
The message is echo'ed back to us.
+
+ Case 6.23.4
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbc
The message is echo'ed back to us.
+
+ Case 6.23.5
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbd
The message is echo'ed back to us.
+
+ Case 6.23.6
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbe
The message is echo'ed back to us.
+
+ Case 6.23.7
+ Up
+
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbf
The message is echo'ed back to us.
+
+ Case 7.1.1
+ Up
+
Send a message followed by a close frame
Echoed message followed by clean close with normal code.
+
+ Case 7.1.2
+ Up
+
Send two close frames
Clean close with normal code. Second close frame ignored.
+
+ Case 7.1.3
+ Up
+
Send a ping after close message
Clean close with normal code, no pong.
+
+ Case 7.1.4
+ Up
+
Send text message after sending a close frame.
Clean close with normal code. Text message ignored.
+
+ Case 7.1.5
+ Up
+
Send message fragment1 followed by close then fragment
Clean close with normal code.
+
+ Case 7.1.6
+ Up
+
Send 256K message followed by close then a ping
Case outcome depends on implementation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asynchronous processing models) the close frame is processed first and the text message may not be received or may only be partially recieved.
+
+ Case 7.3.1
+ Up
+
Send a close frame with payload length 0 (no close code, no close reason)
Clean close with normal code.
+
+ Case 7.3.2
+ Up
+
Send a close frame with payload length 1
Clean close with protocol error or drop TCP.
+
+ Case 7.3.3
+ Up
+
Send a close frame with payload length 2 (regular close with a code)
Clean close with normal code.
+
+ Case 7.3.4
+ Up
+
Send a close frame with close code and close reason
Clean close with normal code.
+
+ Case 7.3.5
+ Up
+
Send a close frame with close code and close reason of maximum length (123)
Clean close with normal code.
+
+ Case 7.3.6
+ Up
+
Send a close frame with close code and close reason which is too long (124) - total frame payload 126 octets
Clean close with protocol error code or dropped TCP connection.
+
+ Case 7.5.1
+ Up
+
Send a close frame with invalid UTF8 payload
Clean close with protocol error or invalid utf8 code or dropped TCP.
+
+ Case 7.7.1
+ Up
+
Send close with valid close code 1000
Clean close with normal or echoed code
+
+ Case 7.7.2
+ Up
+
Send close with valid close code 1001
Clean close with normal or echoed code
+
+ Case 7.7.3
+ Up
+
Send close with valid close code 1002
Clean close with normal or echoed code
+
+ Case 7.7.4
+ Up
+
Send close with valid close code 1003
Clean close with normal or echoed code
+
+ Case 7.7.5
+ Up
+
Send close with valid close code 1007
Clean close with normal or echoed code
+
+ Case 7.7.6
+ Up
+
Send close with valid close code 1008
Clean close with normal or echoed code
+
+ Case 7.7.7
+ Up
+
Send close with valid close code 1009
Clean close with normal or echoed code
+
+ Case 7.7.8
+ Up
+
Send close with valid close code 1010
Clean close with normal or echoed code
+
+ Case 7.7.9
+ Up
+
Send close with valid close code 1011
Clean close with normal or echoed code
+
+ Case 7.7.10
+ Up
+
Send close with valid close code 3000
Clean close with normal or echoed code
+
+ Case 7.7.11
+ Up
+
Send close with valid close code 3999
Clean close with normal or echoed code
+
+ Case 7.7.12
+ Up
+
Send close with valid close code 4000
Clean close with normal or echoed code
+
+ Case 7.7.13
+ Up
+
Send close with valid close code 4999
Clean close with normal or echoed code
+
+ Case 7.9.1
+ Up
+
Send close with invalid close code 0
Clean close with protocol error code or drop TCP
+
+ Case 7.9.2
+ Up
+
Send close with invalid close code 999
Clean close with protocol error code or drop TCP
+
+ Case 7.9.3
+ Up
+
Send close with invalid close code 1004
Clean close with protocol error code or drop TCP
+
+ Case 7.9.4
+ Up
+
Send close with invalid close code 1005
Clean close with protocol error code or drop TCP
+
+ Case 7.9.5
+ Up
+
Send close with invalid close code 1006
Clean close with protocol error code or drop TCP
+
+ Case 7.9.6
+ Up
+
Send close with invalid close code 1016
Clean close with protocol error code or drop TCP
+
+ Case 7.9.7
+ Up
+
Send close with invalid close code 1100
Clean close with protocol error code or drop TCP
+
+ Case 7.9.8
+ Up
+
Send close with invalid close code 2000
Clean close with protocol error code or drop TCP
+
+ Case 7.9.9
+ Up
+
Send close with invalid close code 2999
Clean close with protocol error code or drop TCP
+
+ Case 7.13.1
+ Up
+
Send close with close code 5000
Actual events are undefined by the spec.
+
+ Case 7.13.2
+ Up
+
Send close with close code 65536
Actual events are undefined by the spec.
+
+ Case 9.1.1
+ Up
+
Send text message message with payload of length 64 * 2**10 (64k).
Receive echo'ed text message (with payload as sent).
+
+ Case 9.1.2
+ Up
+
Send text message message with payload of length 256 * 2**10 (256k).
Receive echo'ed text message (with payload as sent).
+
+ Case 9.1.3
+ Up
+
Send text message message with payload of length 1 * 2**20 (1M).
Receive echo'ed text message (with payload as sent).
+
+ Case 9.1.4
+ Up
+
Send text message message with payload of length 4 * 2**20 (4M).
Receive echo'ed text message (with payload as sent).
+
+ Case 9.1.5
+ Up
+
Send text message message with payload of length 8 * 2**20 (8M).
Receive echo'ed text message (with payload as sent).
+
+ Case 9.1.6
+ Up
+
Send text message message with payload of length 16 * 2**20 (16M).
Receive echo'ed text message (with payload as sent).
+
+ Case 9.2.1
+ Up
+
Send binary message message with payload of length 64 * 2**10 (64k).
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.2.2
+ Up
+
Send binary message message with payload of length 256 * 2**10 (256k).
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.2.3
+ Up
+
Send binary message message with payload of length 1 * 2**20 (1M).
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.2.4
+ Up
+
Send binary message message with payload of length 4 * 2**20 (4M).
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.2.5
+ Up
+
Send binary message message with payload of length 8 * 2**20 (16M).
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.2.6
+ Up
+
Send binary message message with payload of length 16 * 2**20 (16M).
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.3.1
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.3.2
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 256.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.3.3
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 1k.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.3.4
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 4k.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.3.5
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 16k.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.3.6
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64k.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.3.7
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 256k.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.3.8
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 1M.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.3.9
+ Up
+
Send fragmented text message message with message payload of length 4 * 2**20 (8M). Sent out in fragments of 4M.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.4.1
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.4.2
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 256.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.4.3
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 1k.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.4.4
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 4k.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.4.5
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 16k.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.4.6
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64k.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.4.7
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 256k.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.4.8
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 1M.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.4.9
+ Up
+
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 4M.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.5.1
+ Up
+
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 64 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.5.2
+ Up
+
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 128 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.5.3
+ Up
+
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 256 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.5.4
+ Up
+
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 512 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.5.5
+ Up
+
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 1024 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.5.6
+ Up
+
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 2048 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.6.1
+ Up
+
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 64 octets.
Receive echo'ed binary message (with payload as sent).
+
+ Case 9.6.2
+ Up
+
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 128 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.6.3
+ Up
+
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 256 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.6.4
+ Up
+
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 512 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.6.5
+ Up
+
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 1024 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.6.6
+ Up
+
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 2048 octets.
Receive echo'ed text message (with payload as sent).
+
+ Case 9.7.1
+ Up
+
Send 1000 text messages of payload size 0 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 9.7.2
+ Up
+
Send 1000 text messages of payload size 16 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 9.7.3
+ Up
+
Send 1000 text messages of payload size 64 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 9.7.4
+ Up
+
Send 1000 text messages of payload size 256 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 9.7.5
+ Up
+
Send 1000 text messages of payload size 1024 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 9.7.6
+ Up
+
Send 1000 text messages of payload size 4096 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 9.8.1
+ Up
+
Send 1000 binary messages of payload size 0 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 9.8.2
+ Up
+
Send 1000 binary messages of payload size 16 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 9.8.3
+ Up
+
Send 1000 binary messages of payload size 64 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 9.8.4
+ Up
+
Send 1000 binary messages of payload size 256 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 9.8.5
+ Up
+
Send 1000 binary messages of payload size 1024 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 9.8.6
+ Up
+
Send 1000 binary messages of payload size 4096 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 10.1.1
+ Up
+
Send text message with payload of length 65536 auto-fragmented with autoFragmentSize = 1300.
Receive echo'ed text message (with payload as sent and transmitted frame counts as expected). Clean close with normal code.
+
+ Case 12.1.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.1.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.1.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 12.1.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 12.1.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.1.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.2.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.2.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 12.2.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 12.2.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.2.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.3.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.3.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 12.3.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 12.3.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.3.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.4.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.4.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 12.4.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 12.4.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.4.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.5.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 12.5.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 12.5.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 12.5.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 12.5.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.1.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.1.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 13.1.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 13.1.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.1.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.2.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.2.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 13.2.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 13.2.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.2.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.3.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.3.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 13.3.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 13.3.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.3.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.4.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.4.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 13.4.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 13.4.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.4.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.5.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.5.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 13.5.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 13.5.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.5.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.6.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.6.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 13.6.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 13.6.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.6.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.1
+ Up
+
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.7.2
+ Up
+
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
+
+ Case 13.7.3
+ Up
+
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
+
+ Case 13.7.4
+ Up
+
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
+
+ Case 13.7.5
+ Up
+
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.6
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.7
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.8
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.9
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.10
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.11
+ Up
+
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.12
+ Up
+
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.13
+ Up
+
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.14
+ Up
+
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.15
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.16
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.17
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+ Case 13.7.18
+ Up
+
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
+
+
From dc3934e927746a709f6b869ef5a1232422b2eb13 Mon Sep 17 00:00:00 2001
From: Harun Tuncay
- ![]()
-
-
-
- Pass
- Test case was executed and passed successfully.
-
-
- Non-Strict
- Test case was executed and passed non-strictly.
- A non-strict behavior is one that does not adhere to a SHOULD-behavior as described in the protocol specification or
- a well-defined, canonical behavior that appears to be desirable but left open in the protocol specification.
- An implementation with non-strict behavior is still conformant to the protocol specification.
-
-
- Fail
- Test case was executed and failed. An implementation which fails a test case - other
- than a performance/limits related one - is non-conforming to a MUST-behavior as described in the protocol specification.
-
-
- Info
- Informational test case which detects certain implementation behavior left unspecified by the spec
- but nevertheless potentially interesting to implementors.
-
-
- Missing
- Test case is missing, either because it was skipped via the test suite configuration
- or deactivated, i.e. because the implementation does not implement the tested feature or breaks during running
- the test case.
-
-
-
-
- 1 Framing
- TooTallNate Java-WebSocket
-
-
- 1.1 Text Messages
-
-
- Case 1.1.1
- Missing
-
-
- Case 1.1.2
- Missing
-
-
- Case 1.1.3
- Missing
-
-
- Case 1.1.4
- Missing
-
-
- Case 1.1.5
- Missing
-
-
- Case 1.1.6
- Missing
-
-
- Case 1.1.7
- Missing
-
-
- Case 1.1.8
- Missing
-
-
- 1 Framing
- TooTallNate Java-WebSocket
-
-
- 1.2 Binary Messages
-
-
- Case 1.2.1
- Missing
-
-
- Case 1.2.2
- Missing
-
-
- Case 1.2.3
- Missing
-
-
- Case 1.2.4
- Missing
-
-
- Case 1.2.5
- Missing
-
-
- Case 1.2.6
- Missing
-
-
- Case 1.2.7
- Missing
-
-
- Case 1.2.8
- Missing
-
-
- 2 Pings/Pongs
- TooTallNate Java-WebSocket
-
-
- Case 2.1
- Missing
-
-
- Case 2.2
- Missing
-
-
- Case 2.3
- Missing
-
-
- Case 2.4
- Missing
-
-
- Case 2.5
- Missing
-
-
- Case 2.6
- Missing
-
-
- Case 2.7
- Missing
-
-
- Case 2.8
- Missing
-
-
- Case 2.9
- Missing
-
-
- Case 2.10
- Missing
-
-
- Case 2.11
- Missing
-
-
- 3 Reserved Bits
- TooTallNate Java-WebSocket
-
-
- Case 3.1
- Missing
-
-
- Case 3.2
- Missing
-
-
- Case 3.3
- Missing
-
-
- Case 3.4
- Missing
-
-
- Case 3.5
- Missing
-
-
- Case 3.6
- Missing
-
-
- Case 3.7
- Missing
-
-
- 4 Opcodes
- TooTallNate Java-WebSocket
-
-
- 4.1 Non-control Opcodes
-
-
- Case 4.1.1
- Missing
-
-
- Case 4.1.2
- Missing
-
-
- Case 4.1.3
- Missing
-
-
- Case 4.1.4
- Missing
-
-
- Case 4.1.5
- Missing
-
-
- 4 Opcodes
- TooTallNate Java-WebSocket
-
-
- 4.2 Control Opcodes
-
-
- Case 4.2.1
- Missing
-
-
- Case 4.2.2
- Missing
-
-
- Case 4.2.3
- Missing
-
-
- Case 4.2.4
- Missing
-
-
- Case 4.2.5
- Missing
-
-
- 5 Fragmentation
- TooTallNate Java-WebSocket
-
-
- Case 5.1
- Missing
-
-
- Case 5.2
- Missing
-
-
- Case 5.3
- Missing
-
-
- Case 5.4
- Missing
-
-
- Case 5.5
- Missing
-
-
- Case 5.6
- Missing
-
-
- Case 5.7
- Missing
-
-
- Case 5.8
- Missing
-
-
- Case 5.9
- Missing
-
-
- Case 5.10
- Missing
-
-
- Case 5.11
- Missing
-
-
- Case 5.12
- Missing
-
-
- Case 5.13
- Missing
-
-
- Case 5.14
- Missing
-
-
- Case 5.15
- Missing
-
-
- Case 5.16
- Missing
-
-
- Case 5.17
- Missing
-
-
- Case 5.18
- Missing
-
-
- Case 5.19
- Missing
-
-
- Case 5.20
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.1 Valid UTF-8 with zero payload fragments
-
-
- Case 6.1.1
- Missing
-
-
- Case 6.1.2
- Missing
-
-
- Case 6.1.3
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.2 Valid UTF-8 unfragmented, fragmented on code-points and within code-points
-
-
- Case 6.2.1
- Missing
-
-
- Case 6.2.2
- Missing
-
-
- Case 6.2.3
- Missing
-
-
- Case 6.2.4
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.3 Invalid UTF-8 differently fragmented
-
-
- Case 6.3.1
- Missing
-
-
- Case 6.3.2
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.4 Fail-fast on invalid UTF-8
-
-
- Case 6.4.1
- Missing
-
-
- Case 6.4.2
- Missing
-
-
- Case 6.4.3
- Missing
-
-
- Case 6.4.4
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.5 Some valid UTF-8 sequences
-
-
- Case 6.5.1
- Missing
-
-
- Case 6.5.2
- Missing
-
-
- Case 6.5.3
- Missing
-
-
- Case 6.5.4
- Missing
-
-
- Case 6.5.5
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.6 All prefixes of a valid UTF-8 string that contains multi-byte code points
-
-
- Case 6.6.1
- Missing
-
-
- Case 6.6.2
- Missing
-
-
- Case 6.6.3
- Missing
-
-
- Case 6.6.4
- Missing
-
-
- Case 6.6.5
- Missing
-
-
- Case 6.6.6
- Missing
-
-
- Case 6.6.7
- Missing
-
-
- Case 6.6.8
- Missing
-
-
- Case 6.6.9
- Missing
-
-
- Case 6.6.10
- Missing
-
-
- Case 6.6.11
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.7 First possible sequence of a certain length
-
-
- Case 6.7.1
- Missing
-
-
- Case 6.7.2
- Missing
-
-
- Case 6.7.3
- Missing
-
-
- Case 6.7.4
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.8 First possible sequence length 5/6 (invalid codepoints)
-
-
- Case 6.8.1
- Missing
-
-
- Case 6.8.2
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.9 Last possible sequence of a certain length
-
-
- Case 6.9.1
- Missing
-
-
- Case 6.9.2
- Missing
-
-
- Case 6.9.3
- Missing
-
-
- Case 6.9.4
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.10 Last possible sequence length 4/5/6 (invalid codepoints)
-
-
- Case 6.10.1
- Missing
-
-
- Case 6.10.2
- Missing
-
-
- Case 6.10.3
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.11 Other boundary conditions
-
-
- Case 6.11.1
- Missing
-
-
- Case 6.11.2
- Missing
-
-
- Case 6.11.3
- Missing
-
-
- Case 6.11.4
- Missing
-
-
- Case 6.11.5
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.12 Unexpected continuation bytes
-
-
- Case 6.12.1
- Missing
-
-
- Case 6.12.2
- Missing
-
-
- Case 6.12.3
- Missing
-
-
- Case 6.12.4
- Missing
-
-
- Case 6.12.5
- Missing
-
-
- Case 6.12.6
- Missing
-
-
- Case 6.12.7
- Missing
-
-
- Case 6.12.8
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.13 Lonely start characters
-
-
- Case 6.13.1
- Missing
-
-
- Case 6.13.2
- Missing
-
-
- Case 6.13.3
- Missing
-
-
- Case 6.13.4
- Missing
-
-
- Case 6.13.5
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.14 Sequences with last continuation byte missing
-
-
- Case 6.14.1
- Missing
-
-
- Case 6.14.2
- Missing
-
-
- Case 6.14.3
- Missing
-
-
- Case 6.14.4
- Missing
-
-
- Case 6.14.5
- Missing
-
-
- Case 6.14.6
- Missing
-
-
- Case 6.14.7
- Missing
-
-
- Case 6.14.8
- Missing
-
-
- Case 6.14.9
- Missing
-
-
- Case 6.14.10
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.15 Concatenation of incomplete sequences
-
-
- Case 6.15.1
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.16 Impossible bytes
-
-
- Case 6.16.1
- Missing
-
-
- Case 6.16.2
- Missing
-
-
- Case 6.16.3
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.17 Examples of an overlong ASCII character
-
-
- Case 6.17.1
- Missing
-
-
- Case 6.17.2
- Missing
-
-
- Case 6.17.3
- Missing
-
-
- Case 6.17.4
- Missing
-
-
- Case 6.17.5
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.18 Maximum overlong sequences
-
-
- Case 6.18.1
- Missing
-
-
- Case 6.18.2
- Missing
-
-
- Case 6.18.3
- Missing
-
-
- Case 6.18.4
- Missing
-
-
- Case 6.18.5
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.19 Overlong representation of the NUL character
-
-
- Case 6.19.1
- Missing
-
-
- Case 6.19.2
- Missing
-
-
- Case 6.19.3
- Missing
-
-
- Case 6.19.4
- Missing
-
-
- Case 6.19.5
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.20 Single UTF-16 surrogates
-
-
- Case 6.20.1
- Missing
-
-
- Case 6.20.2
- Missing
-
-
- Case 6.20.3
- Missing
-
-
- Case 6.20.4
- Missing
-
-
- Case 6.20.5
- Missing
-
-
- Case 6.20.6
- Missing
-
-
- Case 6.20.7
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.21 Paired UTF-16 surrogates
-
-
- Case 6.21.1
- Missing
-
-
- Case 6.21.2
- Missing
-
-
- Case 6.21.3
- Missing
-
-
- Case 6.21.4
- Missing
-
-
- Case 6.21.5
- Missing
-
-
- Case 6.21.6
- Missing
-
-
- Case 6.21.7
- Missing
-
-
- Case 6.21.8
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.22 Non-character code points (valid UTF-8)
-
-
- Case 6.22.1
- Missing
-
-
- Case 6.22.2
- Missing
-
-
- Case 6.22.3
- Missing
-
-
- Case 6.22.4
- Missing
-
-
- Case 6.22.5
- Missing
-
-
- Case 6.22.6
- Missing
-
-
- Case 6.22.7
- Missing
-
-
- Case 6.22.8
- Missing
-
-
- Case 6.22.9
- Missing
-
-
- Case 6.22.10
- Missing
-
-
- Case 6.22.11
- Missing
-
-
- Case 6.22.12
- Missing
-
-
- Case 6.22.13
- Missing
-
-
- Case 6.22.14
- Missing
-
-
- Case 6.22.15
- Missing
-
-
- Case 6.22.16
- Missing
-
-
- Case 6.22.17
- Missing
-
-
- Case 6.22.18
- Missing
-
-
- Case 6.22.19
- Missing
-
-
- Case 6.22.20
- Missing
-
-
- Case 6.22.21
- Missing
-
-
- Case 6.22.22
- Missing
-
-
- Case 6.22.23
- Missing
-
-
- Case 6.22.24
- Missing
-
-
- Case 6.22.25
- Missing
-
-
- Case 6.22.26
- Missing
-
-
- Case 6.22.27
- Missing
-
-
- Case 6.22.28
- Missing
-
-
- Case 6.22.29
- Missing
-
-
- Case 6.22.30
- Missing
-
-
- Case 6.22.31
- Missing
-
-
- Case 6.22.32
- Missing
-
-
- Case 6.22.33
- Missing
-
-
- Case 6.22.34
- Missing
-
-
- 6 UTF-8 Handling
- TooTallNate Java-WebSocket
-
-
- 6.23 Unicode specials (i.e. replacement char)
-
-
- Case 6.23.1
- Missing
-
-
- Case 6.23.2
- Missing
-
-
- Case 6.23.3
- Missing
-
-
- Case 6.23.4
- Missing
-
-
- Case 6.23.5
- Missing
-
-
- Case 6.23.6
- Missing
-
-
- Case 6.23.7
- Missing
-
-
- 7 Close Handling
- TooTallNate Java-WebSocket
-
-
- 7.1 Basic close behavior (fuzzer initiated)
-
-
- Case 7.1.1
- Missing
-
-
- Case 7.1.2
- Missing
-
-
- Case 7.1.3
- Missing
-
-
- Case 7.1.4
- Missing
-
-
- Case 7.1.5
- Missing
-
-
- Case 7.1.6
- Missing
-
-
- 7 Close Handling
- TooTallNate Java-WebSocket
-
-
- 7.3 Close frame structure: payload length (fuzzer initiated)
-
-
- Case 7.3.1
- Missing
-
-
- Case 7.3.2
- Missing
-
-
- Case 7.3.3
- Missing
-
-
- Case 7.3.4
- Missing
-
-
- Case 7.3.5
- Missing
-
-
- Case 7.3.6
- Missing
-
-
- 7 Close Handling
- TooTallNate Java-WebSocket
-
-
- 7.5 Close frame structure: payload value (fuzzer initiated)
-
-
- Case 7.5.1
- Missing
-
-
- 7 Close Handling
- TooTallNate Java-WebSocket
-
-
- 7.7 Close frame structure: valid close codes (fuzzer initiated)
-
-
- Case 7.7.1
- Missing
-
-
- Case 7.7.2
- Missing
-
-
- Case 7.7.3
- Missing
-
-
- Case 7.7.4
- Missing
-
-
- Case 7.7.5
- Missing
-
-
- Case 7.7.6
- Missing
-
-
- Case 7.7.7
- Missing
-
-
- Case 7.7.8
- Missing
-
-
- Case 7.7.9
- Missing
-
-
- Case 7.7.10
- Missing
-
-
- Case 7.7.11
- Missing
-
-
- Case 7.7.12
- Missing
-
-
- Case 7.7.13
- Missing
-
-
- 7 Close Handling
- TooTallNate Java-WebSocket
-
-
- 7.9 Close frame structure: invalid close codes (fuzzer initiated)
-
-
- Case 7.9.1
- Missing
-
-
- Case 7.9.2
- Missing
-
-
- Case 7.9.3
- Missing
-
-
- Case 7.9.4
- Missing
-
-
- Case 7.9.5
- Missing
-
-
- Case 7.9.6
- Missing
-
-
- Case 7.9.7
- Missing
-
-
- Case 7.9.8
- Missing
-
-
- Case 7.9.9
- Missing
-
-
- 7 Close Handling
- TooTallNate Java-WebSocket
-
-
- 7.13 Informational close information (fuzzer initiated)
-
-
- Case 7.13.1
- Missing
-
-
- Case 7.13.2
- Missing
-
-
- 9 Limits/Performance
- TooTallNate Java-WebSocket
-
-
- 9.1 Text Message (increasing size)
-
-
- Case 9.1.1
- Missing
-
-
- Case 9.1.2
- Missing
-
-
- Case 9.1.3
- Missing
-
-
- Case 9.1.4
- Missing
-
-
- Case 9.1.5
- Missing
-
-
- Case 9.1.6
- Missing
-
-
- 9 Limits/Performance
- TooTallNate Java-WebSocket
-
-
- 9.2 Binary Message (increasing size)
-
-
- Case 9.2.1
- Missing
-
-
- Case 9.2.2
- Missing
-
-
- Case 9.2.3
- Missing
-
-
- Case 9.2.4
- Missing
-
-
- Case 9.2.5
- Missing
-
-
- Case 9.2.6
- Missing
-
-
- 9 Limits/Performance
- TooTallNate Java-WebSocket
-
-
- 9.3 Fragmented Text Message (fixed size, increasing fragment size)
-
-
- Case 9.3.1
- Missing
-
-
- Case 9.3.2
- Missing
-
-
- Case 9.3.3
- Missing
-
-
- Case 9.3.4
- Missing
-
-
- Case 9.3.5
- Missing
-
-
- Case 9.3.6
- Missing
-
-
- Case 9.3.7
- Missing
-
-
- Case 9.3.8
- Missing
-
-
- Case 9.3.9
- Missing
-
-
- 9 Limits/Performance
- TooTallNate Java-WebSocket
-
-
- 9.4 Fragmented Binary Message (fixed size, increasing fragment size)
-
-
- Case 9.4.1
- Missing
-
-
- Case 9.4.2
- Missing
-
-
- Case 9.4.3
- Missing
-
-
- Case 9.4.4
- Missing
-
-
- Case 9.4.5
- Missing
-
-
- Case 9.4.6
- Missing
-
-
- Case 9.4.7
- Missing
-
-
- Case 9.4.8
- Missing
-
-
- Case 9.4.9
- Missing
-
-
- 9 Limits/Performance
- TooTallNate Java-WebSocket
-
-
- 9.5 Text Message (fixed size, increasing chop size)
-
-
- Case 9.5.1
- Missing
-
-
- Case 9.5.2
- Missing
-
-
- Case 9.5.3
- Missing
-
-
- Case 9.5.4
- Missing
-
-
- Case 9.5.5
- Missing
-
-
- Case 9.5.6
- Missing
-
-
- 9 Limits/Performance
- TooTallNate Java-WebSocket
-
-
- 9.6 Binary Text Message (fixed size, increasing chop size)
-
-
- Case 9.6.1
- Missing
-
-
- Case 9.6.2
- Missing
-
-
- Case 9.6.3
- Missing
-
-
- Case 9.6.4
- Missing
-
-
- Case 9.6.5
- Missing
-
-
- Case 9.6.6
- Missing
-
-
- 9 Limits/Performance
- TooTallNate Java-WebSocket
-
-
- 9.7 Text Message Roundtrip Time (fixed number, increasing size)
-
-
- Case 9.7.1
- Missing
-
-
- Case 9.7.2
- Missing
-
-
- Case 9.7.3
- Missing
-
-
- Case 9.7.4
- Missing
-
-
- Case 9.7.5
- Missing
-
-
- Case 9.7.6
- Missing
-
-
- 9 Limits/Performance
- TooTallNate Java-WebSocket
-
-
- 9.8 Binary Message Roundtrip Time (fixed number, increasing size)
-
-
- Case 9.8.1
- Missing
-
-
- Case 9.8.2
- Missing
-
-
- Case 9.8.3
- Missing
-
-
- Case 9.8.4
- Missing
-
-
- Case 9.8.5
- Missing
-
-
- Case 9.8.6
- Missing
-
-
- 10 Misc
- TooTallNate Java-WebSocket
-
-
- 10.1 Auto-Fragmentation
-
-
- Case 10.1.1
- Missing
-
-
- 12 WebSocket Compression (different payloads)
- TooTallNate Java-WebSocket
-
-
- 12.1 Large JSON data file (utf8, 194056 bytes)
-
-
- Case 12.1.1
- Pass
629 ms [1.000/0.985]1000
-
-
- Case 12.1.2
- Pass
530 ms [1.000/0.748]1000
-
-
- Case 12.1.3
- Pass
580 ms [1.000/0.521]1000
-
-
- Case 12.1.4
- Pass
586 ms [1.000/0.170]1000
-
-
- Case 12.1.5
- Pass
680 ms [1.000/0.075]1000
-
-
- Case 12.1.6
- Pass
743 ms [1.000/0.059]1000
-
-
- Case 12.1.7
- Pass
925 ms [1.000/0.051]1000
-
-
- Case 12.1.8
- Pass
1399 ms [1.000/0.047]1000
-
-
- Case 12.1.9
- Pass
2314 ms [1.000/0.045]1000
-
-
- Case 12.1.10
- Pass
4054 ms [1.000/0.044]1000
-
-
- Case 12.1.11
- Pass
791 ms [1.000/0.059]1000
-
-
- Case 12.1.12
- Pass
1062 ms [1.000/0.051]1000
-
-
- Case 12.1.13
- Pass
1434 ms [1.000/0.047]1000
-
-
- Case 12.1.14
- Pass
2321 ms [1.000/0.045]1000
-
-
- Case 12.1.15
- Pass
4176 ms [1.000/0.044]1000
-
-
- Case 12.1.16
- Pass
4347 ms [1.000/0.044]1000
-
-
- Case 12.1.17
- Pass
4341 ms [1.000/0.044]1000
-
-
- Case 12.1.18
- Pass
3812 ms [1.000/0.044]1000
-
-
- 12 WebSocket Compression (different payloads)
- TooTallNate Java-WebSocket
-
-
- 12.2 Lena Picture, Bitmap 512x512 bw (binary, 263222 bytes)
-
-
- Case 12.2.1
- Pass
227 ms [1.000/1.174]1000
-
-
- Case 12.2.2
- Pass
267 ms [1.000/1.045]1000
-
-
- Case 12.2.3
- Pass
243 ms [1.000/1.008]1000
-
-
- Case 12.2.4
- Pass
310 ms [1.000/0.949]1000
-
-
- Case 12.2.5
- Pass
426 ms [1.000/0.889]1000
-
-
- Case 12.2.6
- Pass
609 ms [1.000/0.873]1000
-
-
- Case 12.2.7
- Pass
943 ms [1.000/0.865]1000
-
-
- Case 12.2.8
- Pass
1781 ms [1.000/0.860]1000
-
-
- Case 12.2.9
- Pass
3846 ms [1.000/0.855]1000
-
-
- Case 12.2.10
- Pass
8088 ms [1.000/0.853]1000
-
-
- Case 12.2.11
- Pass
931 ms [1.000/0.873]1000
-
-
- Case 12.2.12
- Pass
1584 ms [1.000/0.865]1000
-
-
- Case 12.2.13
- Pass
2828 ms [1.000/0.860]1000
-
-
- Case 12.2.14
- Pass
5984 ms [1.000/0.855]1000
-
-
- Case 12.2.15
- Pass
12014 ms [1.000/0.853]1000
-
-
- Case 12.2.16
- Pass
9343 ms [1.000/0.853]1000
-
-
- Case 12.2.17
- Pass
8312 ms [1.000/0.853]1000
-
-
- Case 12.2.18
- Pass
7942 ms [1.000/0.853]1000
-
-
- 12 WebSocket Compression (different payloads)
- TooTallNate Java-WebSocket
-
-
- 12.3 Human readable text, Goethe's Faust I (German) (binary, 222218 bytes)
-
-
- Case 12.3.1
- Pass
215 ms [1.000/1.122]1000
-
-
- Case 12.3.2
- Pass
221 ms [1.000/0.976]1000
-
-
- Case 12.3.3
- Pass
258 ms [1.000/0.725]1000
-
-
- Case 12.3.4
- Pass
291 ms [1.000/0.564]1000
-
-
- Case 12.3.5
- Pass
437 ms [1.000/0.481]1000
-
-
- Case 12.3.6
- Pass
693 ms [1.000/0.453]1000
-
-
- Case 12.3.7
- Pass
1220 ms [1.000/0.432]1000
-
-
- Case 12.3.8
- Pass
2539 ms [1.000/0.415]1000
-
-
- Case 12.3.9
- Pass
5329 ms [1.000/0.401]1000
-
-
- Case 12.3.10
- Pass
10841 ms [1.000/0.393]1000
-
-
- Case 12.3.11
- Pass
967 ms [1.000/0.453]1000
-
-
- Case 12.3.12
- Pass
1545 ms [1.000/0.432]1000
-
-
- Case 12.3.13
- Pass
3089 ms [1.000/0.415]1000
-
-
- Case 12.3.14
- Pass
6436 ms [1.000/0.401]1000
-
-
- Case 12.3.15
- Pass
13066 ms [1.000/0.393]1000
-
-
- Case 12.3.16
- Pass
11125 ms [1.000/0.393]1000
-
-
- Case 12.3.17
- Pass
11066 ms [1.000/0.393]1000
-
-
- Case 12.3.18
- Pass
11809 ms [1.000/0.393]1000
-
-
- 12 WebSocket Compression (different payloads)
- TooTallNate Java-WebSocket
-
-
- 12.4 Large HTML file (utf8, 263527 bytes)
-
-
- Case 12.4.1
- Pass
598 ms [1.000/1.048]1000
-
-
- Case 12.4.2
- Pass
602 ms [1.000/0.832]1000
-
-
- Case 12.4.3
- Pass
619 ms [1.000/0.623]1000
-
-
- Case 12.4.4
- Pass
614 ms [1.000/0.262]1000
-
-
- Case 12.4.5
- Pass
734 ms [1.000/0.112]1000
-
-
- Case 12.4.6
- Pass
846 ms [1.000/0.083]1000
-
-
- Case 12.4.7
- Pass
1017 ms [1.000/0.069]1000
-
-
- Case 12.4.8
- Pass
1381 ms [1.000/0.061]1000
-
-
- Case 12.4.9
- Pass
2304 ms [1.000/0.058]1000
-
-
- Case 12.4.10
- Pass
4112 ms [1.000/0.057]1000
-
-
- Case 12.4.11
- Pass
904 ms [1.000/0.083]1000
-
-
- Case 12.4.12
- Pass
1042 ms [1.000/0.069]1000
-
-
- Case 12.4.13
- Pass
1542 ms [1.000/0.061]1000
-
-
- Case 12.4.14
- Pass
2577 ms [1.000/0.058]1000
-
-
- Case 12.4.15
- Pass
4434 ms [1.000/0.057]1000
-
-
- Case 12.4.16
- Pass
4285 ms [1.000/0.057]1000
-
-
- Case 12.4.17
- Pass
4446 ms [1.000/0.057]1000
-
-
- Case 12.4.18
- Pass
4198 ms [1.000/0.057]1000
-
-
- 12 WebSocket Compression (different payloads)
- TooTallNate Java-WebSocket
-
-
- 12.5 A larger PDF (binary, 1042328 bytes)
-
-
- Case 12.5.1
- Pass
210 ms [1.000/1.175]1000
-
-
- Case 12.5.2
- Pass
238 ms [1.000/1.074]1000
-
-
- Case 12.5.3
- Pass
298 ms [1.000/1.004]1000
-
-
- Case 12.5.4
- Pass
305 ms [1.000/0.900]1000
-
-
- Case 12.5.5
- Pass
407 ms [1.000/0.855]1000
-
-
- Case 12.5.6
- Pass
550 ms [1.000/0.819]1000
-
-
- Case 12.5.7
- Pass
838 ms [1.000/0.793]1000
-
-
- Case 12.5.8
- Pass
1633 ms [1.000/0.777]1000
-
-
- Case 12.5.9
- Pass
3097 ms [1.000/0.768]1000
-
-
- Case 12.5.10
- Pass
6205 ms [1.000/0.763]1000
-
-
- Case 12.5.11
- Pass
907 ms [1.000/0.819]1000
-
-
- Case 12.5.12
- Pass
1439 ms [1.000/0.793]1000
-
-
- Case 12.5.13
- Pass
2418 ms [1.000/0.777]1000
-
-
- Case 12.5.14
- Pass
4615 ms [1.000/0.768]1000
-
-
- Case 12.5.15
- Pass
9603 ms [1.000/0.763]1000
-
-
- Case 12.5.16
- Pass
7019 ms [1.000/0.763]1000
-
-
- Case 12.5.17
- Pass
6347 ms [1.000/0.763]1000
-
-
- Case 12.5.18
- Pass
6237 ms [1.000/0.763]1000
-
-
- 13 WebSocket Compression (different parameters)
- TooTallNate Java-WebSocket
-
-
- 13.1 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
-
-
- Case 13.1.1
- Pass
477 ms [1.000/0.985]1000
-
-
- Case 13.1.2
- Pass
521 ms [1.000/0.748]1000
-
-
- Case 13.1.3
- Pass
544 ms [1.000/0.521]1000
-
-
- Case 13.1.4
- Pass
525 ms [1.000/0.170]1000
-
-
- Case 13.1.5
- Pass
650 ms [1.000/0.075]1000
-
-
- Case 13.1.6
- Pass
745 ms [1.000/0.059]1000
-
-
- Case 13.1.7
- Pass
939 ms [1.000/0.051]1000
-
-
- Case 13.1.8
- Pass
1324 ms [1.000/0.047]1000
-
-
- Case 13.1.9
- Pass
2252 ms [1.000/0.045]1000
-
-
- Case 13.1.10
- Pass
3988 ms [1.000/0.044]1000
-
-
- Case 13.1.11
- Pass
806 ms [1.000/0.059]1000
-
-
- Case 13.1.12
- Pass
977 ms [1.000/0.051]1000
-
-
- Case 13.1.13
- Pass
1467 ms [1.000/0.047]1000
-
-
- Case 13.1.14
- Pass
2335 ms [1.000/0.045]1000
-
-
- Case 13.1.15
- Pass
4039 ms [1.000/0.044]1000
-
-
- Case 13.1.16
- Pass
4009 ms [1.000/0.044]1000
-
-
- Case 13.1.17
- Pass
4423 ms [1.000/0.044]1000
-
-
- Case 13.1.18
- Pass
3806 ms [1.000/0.044]1000
-
-
- 13 WebSocket Compression (different parameters)
- TooTallNate Java-WebSocket
-
-
- 13.2 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
-
-
- Case 13.2.1
- Pass
453 ms [1.000/0.985]1000
-
-
- Case 13.2.2
- Pass
496 ms [1.000/0.748]1000
-
-
- Case 13.2.3
- Pass
492 ms [1.000/0.521]1000
-
-
- Case 13.2.4
- Pass
555 ms [1.000/0.170]1000
-
-
- Case 13.2.5
- Pass
635 ms [1.000/0.075]1000
-
-
- Case 13.2.6
- Pass
711 ms [1.000/0.059]1000
-
-
- Case 13.2.7
- Pass
931 ms [1.000/0.051]1000
-
-
- Case 13.2.8
- Pass
1270 ms [1.000/0.047]1000
-
-
- Case 13.2.9
- Pass
2134 ms [1.000/0.045]1000
-
-
- Case 13.2.10
- Pass
3863 ms [1.000/0.044]1000
-
-
- Case 13.2.11
- Pass
779 ms [1.000/0.059]1000
-
-
- Case 13.2.12
- Pass
973 ms [1.000/0.051]1000
-
-
- Case 13.2.13
- Pass
1389 ms [1.000/0.047]1000
-
-
- Case 13.2.14
- Pass
2201 ms [1.000/0.045]1000
-
-
- Case 13.2.15
- Pass
4032 ms [1.000/0.044]1000
-
-
- Case 13.2.16
- Pass
3992 ms [1.000/0.044]1000
-
-
- Case 13.2.17
- Pass
4234 ms [1.000/0.044]1000
-
-
- Case 13.2.18
- Pass
3847 ms [1.000/0.044]1000
-
-
- 13 WebSocket Compression (different parameters)
- TooTallNate Java-WebSocket
-
-
- 13.3 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
-
-
- Case 13.3.1
- Pass
538 ms [1.000/0.985]1000
-
-
- Case 13.3.2
- Pass
527 ms [1.000/0.748]1000
-
-
- Case 13.3.3
- Pass
495 ms [1.000/0.521]1000
-
-
- Case 13.3.4
- Pass
544 ms [1.000/0.170]1000
-
-
- Case 13.3.5
- Pass
692 ms [1.000/0.075]1000
-
-
- Case 13.3.6
- Pass
750 ms [1.000/0.059]1000
-
-
- Case 13.3.7
- Pass
978 ms [1.000/0.051]1000
-
-
- Case 13.3.8
- Pass
1316 ms [1.000/0.047]1000
-
-
- Case 13.3.9
- Pass
2134 ms [1.000/0.045]1000
-
-
- Case 13.3.10
- Pass
3762 ms [1.000/0.044]1000
-
-
- Case 13.3.11
- Pass
785 ms [1.000/0.059]1000
-
-
- Case 13.3.12
- Pass
987 ms [1.000/0.051]1000
-
-
- Case 13.3.13
- Pass
1442 ms [1.000/0.047]1000
-
-
- Case 13.3.14
- Pass
2478 ms [1.000/0.045]1000
-
-
- Case 13.3.15
- Pass
4157 ms [1.000/0.044]1000
-
-
- Case 13.3.16
- Pass
4171 ms [1.000/0.044]1000
-
-
- Case 13.3.17
- Pass
4438 ms [1.000/0.044]1000
-
-
- Case 13.3.18
- Pass
3711 ms [1.000/0.044]1000
-
-
- 13 WebSocket Compression (different parameters)
- TooTallNate Java-WebSocket
-
-
- 13.4 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
-
-
- Case 13.4.1
- Pass
495 ms [1.000/0.985]1000
-
-
- Case 13.4.2
- Pass
470 ms [1.000/0.748]1000
-
-
- Case 13.4.3
- Pass
493 ms [1.000/0.521]1000
-
-
- Case 13.4.4
- Pass
531 ms [1.000/0.170]1000
-
-
- Case 13.4.5
- Pass
637 ms [1.000/0.075]1000
-
-
- Case 13.4.6
- Pass
719 ms [1.000/0.059]1000
-
-
- Case 13.4.7
- Pass
906 ms [1.000/0.051]1000
-
-
- Case 13.4.8
- Pass
1281 ms [1.000/0.047]1000
-
-
- Case 13.4.9
- Pass
2103 ms [1.000/0.045]1000
-
-
- Case 13.4.10
- Pass
3671 ms [1.000/0.044]1000
-
-
- Case 13.4.11
- Pass
771 ms [1.000/0.059]1000
-
-
- Case 13.4.12
- Pass
976 ms [1.000/0.051]1000
-
-
- Case 13.4.13
- Pass
1435 ms [1.000/0.047]1000
-
-
- Case 13.4.14
- Pass
2350 ms [1.000/0.045]1000
-
-
- Case 13.4.15
- Pass
4051 ms [1.000/0.044]1000
-
-
- Case 13.4.16
- Pass
4005 ms [1.000/0.044]1000
-
-
- Case 13.4.17
- Pass
4504 ms [1.000/0.044]1000
-
-
- Case 13.4.18
- Pass
3954 ms [1.000/0.044]1000
-
-
- 13 WebSocket Compression (different parameters)
- TooTallNate Java-WebSocket
-
-
- 13.5 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
-
-
- Case 13.5.1
- Pass
492 ms [1.000/0.985]1000
-
-
- Case 13.5.2
- Pass
525 ms [1.000/0.748]1000
-
-
- Case 13.5.3
- Pass
590 ms [1.000/0.521]1000
-
-
- Case 13.5.4
- Pass
577 ms [1.000/0.170]1000
-
-
- Case 13.5.5
- Pass
722 ms [1.000/0.075]1000
-
-
- Case 13.5.6
- Pass
816 ms [1.000/0.059]1000
-
-
- Case 13.5.7
- Pass
978 ms [1.000/0.051]1000
-
-
- Case 13.5.8
- Pass
1320 ms [1.000/0.047]1000
-
-
- Case 13.5.9
- Pass
2182 ms [1.000/0.045]1000
-
-
- Case 13.5.10
- Pass
3981 ms [1.000/0.044]1000
-
-
- Case 13.5.11
- Pass
823 ms [1.000/0.059]1000
-
-
- Case 13.5.12
- Pass
1042 ms [1.000/0.051]1000
-
-
- Case 13.5.13
- Pass
1456 ms [1.000/0.047]1000
-
-
- Case 13.5.14
- Pass
2339 ms [1.000/0.045]1000
-
-
- Case 13.5.15
- Pass
4093 ms [1.000/0.044]1000
-
-
- Case 13.5.16
- Pass
3879 ms [1.000/0.044]1000
-
-
- Case 13.5.17
- Pass
4201 ms [1.000/0.044]1000
-
-
- Case 13.5.18
- Pass
3777 ms [1.000/0.044]1000
-
-
- 13 WebSocket Compression (different parameters)
- TooTallNate Java-WebSocket
-
-
- 13.6 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
-
-
- Case 13.6.1
- Pass
486 ms [1.000/0.985]1000
-
-
- Case 13.6.2
- Pass
519 ms [1.000/0.748]1000
-
-
- Case 13.6.3
- Pass
535 ms [1.000/0.521]1000
-
-
- Case 13.6.4
- Pass
543 ms [1.000/0.170]1000
-
-
- Case 13.6.5
- Pass
653 ms [1.000/0.075]1000
-
-
- Case 13.6.6
- Pass
712 ms [1.000/0.059]1000
-
-
- Case 13.6.7
- Pass
918 ms [1.000/0.051]1000
-
-
- Case 13.6.8
- Pass
1285 ms [1.000/0.047]1000
-
-
- Case 13.6.9
- Pass
2166 ms [1.000/0.045]1000
-
-
- Case 13.6.10
- Pass
3698 ms [1.000/0.044]1000
-
-
- Case 13.6.11
- Pass
773 ms [1.000/0.059]1000
-
-
- Case 13.6.12
- Pass
978 ms [1.000/0.051]1000
-
-
- Case 13.6.13
- Pass
1363 ms [1.000/0.047]1000
-
-
- Case 13.6.14
- Pass
2362 ms [1.000/0.045]1000
-
-
- Case 13.6.15
- Pass
4349 ms [1.000/0.044]1000
-
-
- Case 13.6.16
- Pass
4305 ms [1.000/0.044]1000
-
-
- Case 13.6.17
- Pass
4359 ms [1.000/0.044]1000
-
-
- Case 13.6.18
- Pass
4246 ms [1.000/0.044]1000
-
-
- 13 WebSocket Compression (different parameters)
- TooTallNate Java-WebSocket
-
-
- 13.7 Large JSON data file (utf8, 194056 bytes) - client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)] / server accept (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
-
-
- Case 13.7.1
- Pass
612 ms [1.000/0.985]1000
-
-
- Case 13.7.2
- Pass
485 ms [1.000/0.748]1000
-
-
- Case 13.7.3
- Pass
537 ms [1.000/0.521]1000
-
-
- Case 13.7.4
- Pass
558 ms [1.000/0.170]1000
-
-
- Case 13.7.5
- Pass
870 ms [1.000/0.075]1000
-
-
- Case 13.7.6
- Pass
842 ms [1.000/0.059]1000
-
-
- Case 13.7.7
- Pass
1134 ms [1.000/0.051]1000
-
-
- Case 13.7.8
- Pass
1285 ms [1.000/0.047]1000
-
-
- Case 13.7.9
- Pass
2269 ms [1.000/0.045]1000
-
-
- Case 13.7.10
- Pass
3975 ms [1.000/0.044]1000
-
-
- Case 13.7.11
- Pass
960 ms [1.000/0.059]1000
-
-
- Case 13.7.12
- Pass
1079 ms [1.000/0.051]1000
-
-
- Case 13.7.13
- Pass
1434 ms [1.000/0.047]1000
-
-
- Case 13.7.14
- Pass
2523 ms [1.000/0.045]1000
-
-
- Case 13.7.15
- Pass
4308 ms [1.000/0.044]1000
-
-
- Case 13.7.16
- Pass
4000 ms [1.000/0.044]1000
-
-
- Case 13.7.17
- Pass
4446 ms [1.000/0.044]1000
-
-
- Case 13.7.18
- Pass
3730 ms [1.000/0.044]1000
-
-
-
- Case 1.1.1
- Up
-
Send text message with payload 0.
Receive echo'ed text message (with empty payload). Clean close with normal code.
-
- Case 1.1.2
- Up
-
Send text message message with payload of length 125.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
-
- Case 1.1.3
- Up
-
Send text message message with payload of length 126.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
-
- Case 1.1.4
- Up
-
Send text message message with payload of length 127.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
-
- Case 1.1.5
- Up
-
Send text message message with payload of length 128.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
-
- Case 1.1.6
- Up
-
Send text message message with payload of length 65535.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
-
- Case 1.1.7
- Up
-
Send text message message with payload of length 65536.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
-
- Case 1.1.8
- Up
-
Send text message message with payload of length 65536. Sent out data in chops of 997 octets.
Receive echo'ed text message (with payload as sent). Clean close with normal code.
-
- Case 1.2.1
- Up
-
Send binary message with payload 0.
Receive echo'ed binary message (with empty payload). Clean close with normal code.
-
- Case 1.2.2
- Up
-
Send binary message message with payload of length 125.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
-
- Case 1.2.3
- Up
-
Send binary message message with payload of length 126.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
-
- Case 1.2.4
- Up
-
Send binary message message with payload of length 127.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
-
- Case 1.2.5
- Up
-
Send binary message message with payload of length 128.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
-
- Case 1.2.6
- Up
-
Send binary message message with payload of length 65535.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
-
- Case 1.2.7
- Up
-
Send binary message message with payload of length 65536.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
-
- Case 1.2.8
- Up
-
Send binary message message with payload of length 65536. Sent out data in chops of 997 octets.
Receive echo'ed binary message (with payload as sent). Clean close with normal code.
-
- Case 2.1
- Up
-
Send ping without payload.
Pong (with empty payload) is sent in reply to Ping. Clean close with normal code.
-
- Case 2.2
- Up
-
Send ping with small text payload.
Pong with payload echo'ed is sent in reply to Ping. Clean close with normal code.
-
- Case 2.3
- Up
-
Send ping with small binary (non UTF-8) payload.
Pong with payload echo'ed is sent in reply to Ping. Clean close with normal code.
-
- Case 2.4
- Up
-
Send ping with binary payload of 125 octets.
Pong with payload echo'ed is sent in reply to Ping. Clean close with normal code.
-
- Case 2.5
- Up
-
Send ping with binary payload of 126 octets.
Connection is failed immediately (1002/Protocol Error), since control frames are only allowed to have payload up to and including 125 octets..
-
- Case 2.6
- Up
-
Send ping with binary payload of 125 octets, send in octet-wise chops.
Pong with payload echo'ed is sent in reply to Ping. Implementations must be TCP clean. Clean close with normal code.
-
- Case 2.7
- Up
-
Send unsolicited pong without payload. Verify nothing is received. Clean close with normal code.
Nothing.
-
- Case 2.8
- Up
-
Send unsolicited pong with payload. Verify nothing is received. Clean close with normal code.
Nothing.
-
- Case 2.9
- Up
-
Send unsolicited pong with payload. Send ping with payload. Verify pong for ping is received.
Nothing in reply to own Pong, but Pong with payload echo'ed in reply to Ping. Clean close with normal code.
-
- Case 2.10
- Up
-
Send 10 Pings with payload.
Pongs for our Pings with all the payloads. Note: This is not required by the Spec .. but we check for this behaviour anyway. Clean close with normal code.
-
- Case 2.11
- Up
-
Send 10 Pings with payload. Send out octets in octet-wise chops.
Pongs for our Pings with all the payloads. Note: This is not required by the Spec .. but we check for this behaviour anyway. Clean close with normal code.
-
- Case 3.1
- Up
-
Send small text message with RSV = 1.
The connection is failed immediately (1002/protocol error), since RSV must be 0, when no extension defining RSV meaning has been negotiated.
-
- Case 3.2
- Up
-
Send small text message, then send again with RSV = 2, then send Ping.
Echo for first message is received, but then connection is failed immediately, since RSV must be 0, when no extension defining RSV meaning has been negotiated. The Pong is not received.
-
- Case 3.3
- Up
-
Send small text message, then send again with RSV = 3, then send Ping. Octets are sent in frame-wise chops. Octets are sent in octet-wise chops.
Echo for first message is received, but then connection is failed immediately, since RSV must be 0, when no extension defining RSV meaning has been negotiated. The Pong is not received.
-
- Case 3.4
- Up
-
Send small text message, then send again with RSV = 4, then send Ping. Octets are sent in octet-wise chops.
Echo for first message is received, but then connection is failed immediately, since RSV must be 0, when no extension defining RSV meaning has been negotiated. The Pong is not received.
-
- Case 3.5
- Up
-
Send small binary message with RSV = 5.
The connection is failed immediately, since RSV must be 0.
-
- Case 3.6
- Up
-
Send Ping with RSV = 6.
The connection is failed immediately, since RSV must be 0.
-
- Case 3.7
- Up
-
Send Close with RSV = 7.
The connection is failed immediately, since RSV must be 0.
-
- Case 4.1.1
- Up
-
Send frame with reserved non-control Opcode = 3.
The connection is failed immediately.
-
- Case 4.1.2
- Up
-
Send frame with reserved non-control Opcode = 4 and non-empty payload.
The connection is failed immediately.
-
- Case 4.1.3
- Up
-
Send small text message, then send frame with reserved non-control Opcode = 5, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
-
- Case 4.1.4
- Up
-
Send small text message, then send frame with reserved non-control Opcode = 6 and non-empty payload, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
-
- Case 4.1.5
- Up
-
Send small text message, then send frame with reserved non-control Opcode = 7 and non-empty payload, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
-
- Case 4.2.1
- Up
-
Send frame with reserved control Opcode = 11.
The connection is failed immediately.
-
- Case 4.2.2
- Up
-
Send frame with reserved control Opcode = 12 and non-empty payload.
The connection is failed immediately.
-
- Case 4.2.3
- Up
-
Send small text message, then send frame with reserved control Opcode = 13, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
-
- Case 4.2.4
- Up
-
Send small text message, then send frame with reserved control Opcode = 14 and non-empty payload, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
-
- Case 4.2.5
- Up
-
Send small text message, then send frame with reserved control Opcode = 15 and non-empty payload, then send Ping.
Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received.
-
- Case 5.1
- Up
-
Send Ping fragmented into 2 fragments.
Connection is failed immediately, since control message MUST NOT be fragmented.
-
- Case 5.2
- Up
-
Send Pong fragmented into 2 fragments.
Connection is failed immediately, since control message MUST NOT be fragmented.
-
- Case 5.3
- Up
-
Send text Message fragmented into 2 fragments.
Message is processed and echo'ed back to us.
-
- Case 5.4
- Up
-
Send text Message fragmented into 2 fragments, octets are sent in frame-wise chops.
Message is processed and echo'ed back to us.
-
- Case 5.5
- Up
-
Send text Message fragmented into 2 fragments, octets are sent in octet-wise chops.
Message is processed and echo'ed back to us.
-
- Case 5.6
- Up
-
Send text Message fragmented into 2 fragments, one ping with payload in-between.
A pong is received, then the message is echo'ed back to us.
-
- Case 5.7
- Up
-
Send text Message fragmented into 2 fragments, one ping with payload in-between. Octets are sent in frame-wise chops.
A pong is received, then the message is echo'ed back to us.
-
- Case 5.8
- Up
-
Send text Message fragmented into 2 fragments, one ping with payload in-between. Octets are sent in octet-wise chops.
A pong is received, then the message is echo'ed back to us.
-
- Case 5.9
- Up
-
Send unfragmented Text Message after Continuation Frame with FIN = true, where there is nothing to continue, sent in one chop.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.10
- Up
-
Send unfragmented Text Message after Continuation Frame with FIN = true, where there is nothing to continue, sent in per-frame chops.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.11
- Up
-
Send unfragmented Text Message after Continuation Frame with FIN = true, where there is nothing to continue, sent in octet-wise chops.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.12
- Up
-
Send unfragmented Text Message after Continuation Frame with FIN = false, where there is nothing to continue, sent in one chop.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.13
- Up
-
Send unfragmented Text Message after Continuation Frame with FIN = false, where there is nothing to continue, sent in per-frame chops.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.14
- Up
-
Send unfragmented Text Message after Continuation Frame with FIN = false, where there is nothing to continue, sent in octet-wise chops.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.15
- Up
-
Send text Message fragmented into 2 fragments, then Continuation Frame with FIN = false where there is nothing to continue, then unfragmented Text Message, all sent in one chop.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.16
- Up
-
Repeated 2x: Continuation Frame with FIN = false (where there is nothing to continue), then text Message fragmented into 2 fragments.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.17
- Up
-
Repeated 2x: Continuation Frame with FIN = true (where there is nothing to continue), then text Message fragmented into 2 fragments.
The connection is failed immediately, since there is no message to continue.
-
- Case 5.18
- Up
-
Send text Message fragmented into 2 fragments, with both frame opcodes set to text, sent in one chop.
The connection is failed immediately, since all data frames after the initial data frame must have opcode 0.
-
- Case 5.19
- Up
-
A fragmented text message is sent in multiple frames. After
- sending the first 2 frames of the text message, a Ping is sent. Then we wait 1s,
- then we send 2 more text fragments, another Ping and then the final text fragment.
- Everything is legal.
The peer immediately answers the first Ping before
- it has received the last text message fragment. The peer pong's back the Ping's
- payload exactly, and echo's the payload of the fragmented message back to us.
-
- Case 5.20
- Up
-
Same as Case 5.19, but send all frames with SYNC = True.
- Note, this does not change the octets sent in any way, only how the stream
- is chopped up on the wire.
Same as Case 5.19. Implementations must be agnostic to how
- octet stream is chopped up on wire (must be TCP clean).
-
- Case 6.1.1
- Up
-
Send text message of length 0.
A message is echo'ed back to us (with empty payload).
-
- Case 6.1.2
- Up
-
Send fragmented text message, 3 fragments each of length 0.
A message is echo'ed back to us (with empty payload).
-
- Case 6.1.3
- Up
-
Send fragmented text message, 3 fragments, first and last of length 0, middle non-empty.
A message is echo'ed back to us (with payload = payload of middle fragment).
-
- Case 6.2.1
- Up
-
Send a valid UTF-8 text message in one fragment.
MESSAGE:
Hello-µ@ßöäüà á-UTF-8!!
48656c6c6f2dc2b540c39fc3b6c3a4c3bcc3a0c3a12d5554462d382121
The message is echo'ed back to us.
-
- Case 6.2.2
- Up
-
Send a valid UTF-8 text message in two fragments, fragmented on UTF-8 code point boundary.
MESSAGE FRAGMENT 1:
Hello-µ@ßöä
48656c6c6f2dc2b540c39fc3b6c3a4
MESSAGE FRAGMENT 2:
üà á-UTF-8!!
c3bcc3a0c3a12d5554462d382121
The message is echo'ed back to us.
-
- Case 6.2.3
- Up
-
Send a valid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
Hello-µ@ßöäüà á-UTF-8!!
48656c6c6f2dc2b540c39fc3b6c3a4c3bcc3a0c3a12d5554462d382121
The message is echo'ed back to us.
-
- Case 6.2.4
- Up
-
Send a valid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
κόσμε
cebae1bdb9cf83cebcceb5
The message is echo'ed back to us.
-
- Case 6.3.1
- Up
-
Send invalid UTF-8 text message unfragmented.
MESSAGE:
cebae1bdb9cf83cebcceb5eda080656469746564
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.3.2
- Up
-
Send invalid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
cebae1bdb9cf83cebcceb5eda080656469746564
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.4.1
- Up
-
Send invalid UTF-8 text message in 3 fragments (frames).
-First frame payload is valid, then wait, then 2nd frame which contains the payload making the sequence invalid, then wait, then 3rd frame with rest.
-Note that PART1 and PART3 are valid UTF-8 in themselves, PART2 is a 0x110000 encoded as in the UTF-8 integer encoding scheme, but the codepoint is invalid (out of range).
-
MESSAGE PARTS:
-PART1 = cebae1bdb9cf83cebcceb5
-PART2 = f4908080
-PART3 = 656469746564
-
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
-
- Case 6.4.2
- Up
-
Same as Case 6.4.1, but in 2nd frame, we send only up to and including the octet making the complete payload invalid.
-
MESSAGE PARTS:
-PART1 = cebae1bdb9cf83cebcceb5f4
-PART2 = 90
-PART3 = 8080656469746564
-
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
-
- Case 6.4.3
- Up
-
Same as Case 6.4.1, but we send message not in 3 frames, but in 3 chops of the same message frame.
-
MESSAGE PARTS:
-PART1 = cebae1bdb9cf83cebcceb5
-PART2 = f4908080
-PART3 = 656469746564
-
The first chop is accepted, we expect to timeout on the first wait. The 2nd chop should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
-
- Case 6.4.4
- Up
-
Same as Case 6.4.2, but we send message not in 3 frames, but in 3 chops of the same message frame.
-
MESSAGE PARTS:
-PART1 = cebae1bdb9cf83cebcceb5f4
-PART2 = 90
-PART3 =
-
The first chop is accepted, we expect to timeout on the first wait. The 2nd chop should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
-
- Case 6.5.1
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x68656c6c6f24776f726c64
The message is echo'ed back to us.
-
- Case 6.5.2
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x68656c6c6fc2a2776f726c64
The message is echo'ed back to us.
-
- Case 6.5.3
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x68656c6c6fe282ac776f726c64
The message is echo'ed back to us.
-
- Case 6.5.4
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x68656c6c6ff0a4ada2776f726c64
The message is echo'ed back to us.
-
- Case 6.5.5
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83cebcceb5
The message is echo'ed back to us.
-
- Case 6.6.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xce
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.6.2
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xceba
The message is echo'ed back to us.
-
- Case 6.6.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.6.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1bd
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.6.5
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9
The message is echo'ed back to us.
-
- Case 6.6.6
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.6.7
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83
The message is echo'ed back to us.
-
- Case 6.6.8
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83ce
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.6.9
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83cebc
The message is echo'ed back to us.
-
- Case 6.6.10
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83cebcce
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.6.11
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xcebae1bdb9cf83cebcceb5
The message is echo'ed back to us.
-
- Case 6.7.1
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x00
The message is echo'ed back to us.
-
- Case 6.7.2
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xc280
The message is echo'ed back to us.
-
- Case 6.7.3
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xe0a080
The message is echo'ed back to us.
-
- Case 6.7.4
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0908080
The message is echo'ed back to us.
-
- Case 6.8.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf888808080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.8.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc8480808080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.9.1
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0x7f
The message is echo'ed back to us.
-
- Case 6.9.2
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xdfbf
The message is echo'ed back to us.
-
- Case 6.9.3
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbf
The message is echo'ed back to us.
-
- Case 6.9.4
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf48fbfbf
The message is echo'ed back to us.
-
- Case 6.10.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf7bfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.10.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfbbfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.10.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfdbfbfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.11.1
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xed9fbf
The message is echo'ed back to us.
-
- Case 6.11.2
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xee8080
The message is echo'ed back to us.
-
- Case 6.11.3
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbd
The message is echo'ed back to us.
-
- Case 6.11.4
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf48fbfbf
The message is echo'ed back to us.
-
- Case 6.11.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf4908080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.12.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.12.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.12.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.12.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf80
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.12.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf80bf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.12.6
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf80bf80
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.12.7
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x80bf80bf80bf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.12.8
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0x808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbe
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.13.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc020c120c220c320c420c520c620c720c820c920ca20cb20cc20cd20ce20cf20d020d120d220d320d420d520d620d720d820d920da20db20dc20dd20de20
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.13.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe020e120e220e320e420e520e620e720e820e920ea20eb20ec20ed20ee20
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.13.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf020f120f220f320f420f520f620
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.13.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf820f920fa20
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.13.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc20
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc0
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf08080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf8808080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc80808080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.6
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xdf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.7
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xefbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.8
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf7bfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.9
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfbbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.14.10
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfdbfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.15.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc0e080f08080f8808080fc80808080dfefbff7bfbffbbfbfbffdbfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.16.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfe
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.16.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xff
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.16.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfefeffff
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.17.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc0af
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.17.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe080af
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.17.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf08080af
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.17.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf8808080af
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.17.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc80808080af
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.18.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc1bf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.18.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe09fbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.18.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf08fbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.18.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf887bfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.18.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc83bfbfbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.19.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xc080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.19.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xe08080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.19.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf0808080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.19.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xf880808080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.19.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xfc8080808080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.20.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xeda080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.20.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedadbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.20.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedae80
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.20.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedafbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.20.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedb080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.20.6
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedbe80
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.20.7
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.21.1
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xeda080edb080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.21.2
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xeda080edbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.21.3
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedadbfedb080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.21.4
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedadbfedbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.21.5
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedae80edb080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.21.6
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedae80edbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.21.7
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedafbfedb080
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.21.8
- Up
-
Send a text message with payload which is not valid UTF-8 in one fragment.
Payload: 0xedafbfedbfbf
The connection is failed immediately, since the payload is not valid UTF-8.
-
- Case 6.22.1
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbe
The message is echo'ed back to us.
-
- Case 6.22.2
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbf
The message is echo'ed back to us.
-
- Case 6.22.3
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf09fbfbe
The message is echo'ed back to us.
-
- Case 6.22.4
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf09fbfbf
The message is echo'ed back to us.
-
- Case 6.22.5
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0afbfbe
The message is echo'ed back to us.
-
- Case 6.22.6
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0afbfbf
The message is echo'ed back to us.
-
- Case 6.22.7
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0bfbfbe
The message is echo'ed back to us.
-
- Case 6.22.8
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf0bfbfbf
The message is echo'ed back to us.
-
- Case 6.22.9
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf18fbfbe
The message is echo'ed back to us.
-
- Case 6.22.10
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf18fbfbf
The message is echo'ed back to us.
-
- Case 6.22.11
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf19fbfbe
The message is echo'ed back to us.
-
- Case 6.22.12
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf19fbfbf
The message is echo'ed back to us.
-
- Case 6.22.13
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf1afbfbe
The message is echo'ed back to us.
-
- Case 6.22.14
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf1afbfbf
The message is echo'ed back to us.
-
- Case 6.22.15
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf1bfbfbe
The message is echo'ed back to us.
-
- Case 6.22.16
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf1bfbfbf
The message is echo'ed back to us.
-
- Case 6.22.17
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf28fbfbe
The message is echo'ed back to us.
-
- Case 6.22.18
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf28fbfbf
The message is echo'ed back to us.
-
- Case 6.22.19
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf29fbfbe
The message is echo'ed back to us.
-
- Case 6.22.20
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf29fbfbf
The message is echo'ed back to us.
-
- Case 6.22.21
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf2afbfbe
The message is echo'ed back to us.
-
- Case 6.22.22
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf2afbfbf
The message is echo'ed back to us.
-
- Case 6.22.23
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf2bfbfbe
The message is echo'ed back to us.
-
- Case 6.22.24
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf2bfbfbf
The message is echo'ed back to us.
-
- Case 6.22.25
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf38fbfbe
The message is echo'ed back to us.
-
- Case 6.22.26
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf38fbfbf
The message is echo'ed back to us.
-
- Case 6.22.27
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf39fbfbe
The message is echo'ed back to us.
-
- Case 6.22.28
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf39fbfbf
The message is echo'ed back to us.
-
- Case 6.22.29
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf3afbfbe
The message is echo'ed back to us.
-
- Case 6.22.30
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf3afbfbf
The message is echo'ed back to us.
-
- Case 6.22.31
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf3bfbfbe
The message is echo'ed back to us.
-
- Case 6.22.32
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf3bfbfbf
The message is echo'ed back to us.
-
- Case 6.22.33
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf48fbfbe
The message is echo'ed back to us.
-
- Case 6.22.34
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xf48fbfbf
The message is echo'ed back to us.
-
- Case 6.23.1
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfb9
The message is echo'ed back to us.
-
- Case 6.23.2
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfba
The message is echo'ed back to us.
-
- Case 6.23.3
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbb
The message is echo'ed back to us.
-
- Case 6.23.4
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbc
The message is echo'ed back to us.
-
- Case 6.23.5
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbd
The message is echo'ed back to us.
-
- Case 6.23.6
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbe
The message is echo'ed back to us.
-
- Case 6.23.7
- Up
-
Send a text message with payload which is valid UTF-8 in one fragment.
Payload: 0xefbfbf
The message is echo'ed back to us.
-
- Case 7.1.1
- Up
-
Send a message followed by a close frame
Echoed message followed by clean close with normal code.
-
- Case 7.1.2
- Up
-
Send two close frames
Clean close with normal code. Second close frame ignored.
-
- Case 7.1.3
- Up
-
Send a ping after close message
Clean close with normal code, no pong.
-
- Case 7.1.4
- Up
-
Send text message after sending a close frame.
Clean close with normal code. Text message ignored.
-
- Case 7.1.5
- Up
-
Send message fragment1 followed by close then fragment
Clean close with normal code.
-
- Case 7.1.6
- Up
-
Send 256K message followed by close then a ping
Case outcome depends on implementation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asynchronous processing models) the close frame is processed first and the text message may not be received or may only be partially recieved.
-
- Case 7.3.1
- Up
-
Send a close frame with payload length 0 (no close code, no close reason)
Clean close with normal code.
-
- Case 7.3.2
- Up
-
Send a close frame with payload length 1
Clean close with protocol error or drop TCP.
-
- Case 7.3.3
- Up
-
Send a close frame with payload length 2 (regular close with a code)
Clean close with normal code.
-
- Case 7.3.4
- Up
-
Send a close frame with close code and close reason
Clean close with normal code.
-
- Case 7.3.5
- Up
-
Send a close frame with close code and close reason of maximum length (123)
Clean close with normal code.
-
- Case 7.3.6
- Up
-
Send a close frame with close code and close reason which is too long (124) - total frame payload 126 octets
Clean close with protocol error code or dropped TCP connection.
-
- Case 7.5.1
- Up
-
Send a close frame with invalid UTF8 payload
Clean close with protocol error or invalid utf8 code or dropped TCP.
-
- Case 7.7.1
- Up
-
Send close with valid close code 1000
Clean close with normal or echoed code
-
- Case 7.7.2
- Up
-
Send close with valid close code 1001
Clean close with normal or echoed code
-
- Case 7.7.3
- Up
-
Send close with valid close code 1002
Clean close with normal or echoed code
-
- Case 7.7.4
- Up
-
Send close with valid close code 1003
Clean close with normal or echoed code
-
- Case 7.7.5
- Up
-
Send close with valid close code 1007
Clean close with normal or echoed code
-
- Case 7.7.6
- Up
-
Send close with valid close code 1008
Clean close with normal or echoed code
-
- Case 7.7.7
- Up
-
Send close with valid close code 1009
Clean close with normal or echoed code
-
- Case 7.7.8
- Up
-
Send close with valid close code 1010
Clean close with normal or echoed code
-
- Case 7.7.9
- Up
-
Send close with valid close code 1011
Clean close with normal or echoed code
-
- Case 7.7.10
- Up
-
Send close with valid close code 3000
Clean close with normal or echoed code
-
- Case 7.7.11
- Up
-
Send close with valid close code 3999
Clean close with normal or echoed code
-
- Case 7.7.12
- Up
-
Send close with valid close code 4000
Clean close with normal or echoed code
-
- Case 7.7.13
- Up
-
Send close with valid close code 4999
Clean close with normal or echoed code
-
- Case 7.9.1
- Up
-
Send close with invalid close code 0
Clean close with protocol error code or drop TCP
-
- Case 7.9.2
- Up
-
Send close with invalid close code 999
Clean close with protocol error code or drop TCP
-
- Case 7.9.3
- Up
-
Send close with invalid close code 1004
Clean close with protocol error code or drop TCP
-
- Case 7.9.4
- Up
-
Send close with invalid close code 1005
Clean close with protocol error code or drop TCP
-
- Case 7.9.5
- Up
-
Send close with invalid close code 1006
Clean close with protocol error code or drop TCP
-
- Case 7.9.6
- Up
-
Send close with invalid close code 1016
Clean close with protocol error code or drop TCP
-
- Case 7.9.7
- Up
-
Send close with invalid close code 1100
Clean close with protocol error code or drop TCP
-
- Case 7.9.8
- Up
-
Send close with invalid close code 2000
Clean close with protocol error code or drop TCP
-
- Case 7.9.9
- Up
-
Send close with invalid close code 2999
Clean close with protocol error code or drop TCP
-
- Case 7.13.1
- Up
-
Send close with close code 5000
Actual events are undefined by the spec.
-
- Case 7.13.2
- Up
-
Send close with close code 65536
Actual events are undefined by the spec.
-
- Case 9.1.1
- Up
-
Send text message message with payload of length 64 * 2**10 (64k).
Receive echo'ed text message (with payload as sent).
-
- Case 9.1.2
- Up
-
Send text message message with payload of length 256 * 2**10 (256k).
Receive echo'ed text message (with payload as sent).
-
- Case 9.1.3
- Up
-
Send text message message with payload of length 1 * 2**20 (1M).
Receive echo'ed text message (with payload as sent).
-
- Case 9.1.4
- Up
-
Send text message message with payload of length 4 * 2**20 (4M).
Receive echo'ed text message (with payload as sent).
-
- Case 9.1.5
- Up
-
Send text message message with payload of length 8 * 2**20 (8M).
Receive echo'ed text message (with payload as sent).
-
- Case 9.1.6
- Up
-
Send text message message with payload of length 16 * 2**20 (16M).
Receive echo'ed text message (with payload as sent).
-
- Case 9.2.1
- Up
-
Send binary message message with payload of length 64 * 2**10 (64k).
Receive echo'ed binary message (with payload as sent).
-
- Case 9.2.2
- Up
-
Send binary message message with payload of length 256 * 2**10 (256k).
Receive echo'ed binary message (with payload as sent).
-
- Case 9.2.3
- Up
-
Send binary message message with payload of length 1 * 2**20 (1M).
Receive echo'ed binary message (with payload as sent).
-
- Case 9.2.4
- Up
-
Send binary message message with payload of length 4 * 2**20 (4M).
Receive echo'ed binary message (with payload as sent).
-
- Case 9.2.5
- Up
-
Send binary message message with payload of length 8 * 2**20 (16M).
Receive echo'ed binary message (with payload as sent).
-
- Case 9.2.6
- Up
-
Send binary message message with payload of length 16 * 2**20 (16M).
Receive echo'ed binary message (with payload as sent).
-
- Case 9.3.1
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64.
Receive echo'ed text message (with payload as sent).
-
- Case 9.3.2
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 256.
Receive echo'ed text message (with payload as sent).
-
- Case 9.3.3
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 1k.
Receive echo'ed text message (with payload as sent).
-
- Case 9.3.4
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 4k.
Receive echo'ed text message (with payload as sent).
-
- Case 9.3.5
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 16k.
Receive echo'ed text message (with payload as sent).
-
- Case 9.3.6
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64k.
Receive echo'ed text message (with payload as sent).
-
- Case 9.3.7
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 256k.
Receive echo'ed text message (with payload as sent).
-
- Case 9.3.8
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 1M.
Receive echo'ed text message (with payload as sent).
-
- Case 9.3.9
- Up
-
Send fragmented text message message with message payload of length 4 * 2**20 (8M). Sent out in fragments of 4M.
Receive echo'ed text message (with payload as sent).
-
- Case 9.4.1
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.4.2
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 256.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.4.3
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 1k.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.4.4
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 4k.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.4.5
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 16k.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.4.6
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64k.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.4.7
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 256k.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.4.8
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 1M.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.4.9
- Up
-
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 4M.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.5.1
- Up
-
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 64 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.5.2
- Up
-
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 128 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.5.3
- Up
-
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 256 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.5.4
- Up
-
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 512 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.5.5
- Up
-
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 1024 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.5.6
- Up
-
Send text message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 2048 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.6.1
- Up
-
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 64 octets.
Receive echo'ed binary message (with payload as sent).
-
- Case 9.6.2
- Up
-
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 128 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.6.3
- Up
-
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 256 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.6.4
- Up
-
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 512 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.6.5
- Up
-
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 1024 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.6.6
- Up
-
Send binary message message with payload of length 1 * 2**20 (1M). Sent out data in chops of 2048 octets.
Receive echo'ed text message (with payload as sent).
-
- Case 9.7.1
- Up
-
Send 1000 text messages of payload size 0 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 60 secs.
-
- Case 9.7.2
- Up
-
Send 1000 text messages of payload size 16 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 60 secs.
-
- Case 9.7.3
- Up
-
Send 1000 text messages of payload size 64 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 60 secs.
-
- Case 9.7.4
- Up
-
Send 1000 text messages of payload size 256 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 120 secs.
-
- Case 9.7.5
- Up
-
Send 1000 text messages of payload size 1024 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 240 secs.
-
- Case 9.7.6
- Up
-
Send 1000 text messages of payload size 4096 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed text messages (with payload as sent). Timeout case after 480 secs.
-
- Case 9.8.1
- Up
-
Send 1000 binary messages of payload size 0 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 60 secs.
-
- Case 9.8.2
- Up
-
Send 1000 binary messages of payload size 16 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 60 secs.
-
- Case 9.8.3
- Up
-
Send 1000 binary messages of payload size 64 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 60 secs.
-
- Case 9.8.4
- Up
-
Send 1000 binary messages of payload size 256 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 120 secs.
-
- Case 9.8.5
- Up
-
Send 1000 binary messages of payload size 1024 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 240 secs.
-
- Case 9.8.6
- Up
-
Send 1000 binary messages of payload size 4096 to measure implementation/network RTT (round trip time) / latency.
Receive echo'ed binary messages (with payload as sent). Timeout case after 480 secs.
-
- Case 10.1.1
- Up
-
Send text message with payload of length 65536 auto-fragmented with autoFragmentSize = 1300.
Receive echo'ed text message (with payload as sent and transmitted frame counts as expected). Clean close with normal code.
-
- Case 12.1.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.1.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.1.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 12.1.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 12.1.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.1.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.2.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.2.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 12.2.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 12.2.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.2.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.3.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.3.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 12.3.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 12.3.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.3.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.4.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.4.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 12.4.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 12.4.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.4.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.5.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 12.5.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 12.5.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 12.5.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 12.5.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use default permessage-deflate offer.
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.1.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.1.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 13.1.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 13.1.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.1.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.2.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.2.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 13.2.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 13.2.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.2.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.3.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.3.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 13.3.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 13.3.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.3.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.4.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.4.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 13.4.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 13.4.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.4.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(False, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.5.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.5.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 13.5.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 13.5.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.5.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.6.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.6.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 13.6.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 13.6.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.6.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 15)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.1
- Up
-
Send 1000 compressed messages each of payload size 16, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.7.2
- Up
-
Send 1000 compressed messages each of payload size 64, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 60 secs.
-
- Case 13.7.3
- Up
-
Send 1000 compressed messages each of payload size 256, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 120 secs.
-
- Case 13.7.4
- Up
-
Send 1000 compressed messages each of payload size 1024, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 240 secs.
-
- Case 13.7.5
- Up
-
Send 1000 compressed messages each of payload size 4096, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.6
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.7
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.8
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.9
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.10
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 0 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.11
- Up
-
Send 1000 compressed messages each of payload size 8192, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.12
- Up
-
Send 1000 compressed messages each of payload size 16384, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.13
- Up
-
Send 1000 compressed messages each of payload size 32768, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.14
- Up
-
Send 1000 compressed messages each of payload size 65536, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.15
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 256 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.16
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 1024 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.17
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 4096 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
- Case 13.7.18
- Up
-
Send 1000 compressed messages each of payload size 131072, auto-fragment to 32768 octets. Use permessage-deflate client offers (requestNoContextTakeover, requestMaxWindowBits): [(True, 8), (True, 0), (False, 0)]
Receive echo'ed messages (with payload as sent). Timeout case after 480 secs.
-
-
From 48a35cea4be68ec8532f3a066c58b5195091095a Mon Sep 17 00:00:00 2001
From: haruntuncay C=9<_nFOr>y7b~6YkkXz0$8|uJG0=
z7HcYvBp{PGsC=9<_nFOr>y7b~6YkkXz0$8|uJG0=
z7HcYvBp{PGs" + errorCodeDescription + "
" ) );
+ return ByteBuffer.wrap( Charsetfunctions.asciiBytes( "HTTP/1.1 " + errorCodeDescription + "\r\nContent-Type: text/html\r\nServer: TooTallNate Java-WebSocket\r\nContent-Length: " + ( 48 + errorCodeDescription.length() ) + "\r\n\r\n" + errorCodeDescription + "
" ) );
}
public synchronized void close( int code, String message, boolean remote ) {
From b56ad28304ec27644a85d7349536e0501bbf5fe7 Mon Sep 17 00:00:00 2001
From: Pawan Gupta " + errorCodeDescription + "
" ) );
+ return ByteBuffer.wrap( Charsetfunctions.asciiBytes( "HTTP/1.1 " + errorCodeDescription + "\r\nContent-Type: text/html\r\nServer: TooTallNate Java-WebSocket\r\nContent-Length: " + ( 48 + errorCodeDescription.length() ) + "\r\n\r\n" + errorCodeDescription + "
" ) );
}
public synchronized void close( int code, String message, boolean remote ) {
From af28db4ab0ccda5056014e80970f8be7c7edbde2 Mon Sep 17 00:00:00 2001
From: yindex Case 6.2.4
Case 6.3.1
Up
-
Send invalid UTF-8 text message unfragmented.
MESSAGE:
κόσμε���edited
cebae1bdb9cf83cebcceb5eda080656469746564
Send invalid UTF-8 text message unfragmented.
MESSAGE:
κόσμε�edited
cebae1bdb9cf83cebcceb5eda080656469746564
The connection is failed immediately, since the payload is not valid UTF-8.
Case 6.3.2
Up
-
Send invalid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
κόσμε���edited
cebae1bdb9cf83cebcceb5eda080656469746564
Send invalid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
κόσμε�edited
cebae1bdb9cf83cebcceb5eda080656469746564
The connection is failed immediately, since the payload is not valid UTF-8.
@@ -2263,7 +2263,7 @@ Case 6.4.1
Note that PART1 and PART3 are valid UTF-8 in themselves, PART2 is a 0x11000 encoded as in the UTF-8 integer encoding scheme, but the codepoint is invalid (out of range).
MESSAGE PARTS:
PART1 = κόσμε (cebae1bdb9cf83cebcceb5)
-PART2 = ���� (f4908080)
+PART2 = ���� (f4908080)
PART3 = edited (656469746564)
Case Expectation
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Description
Same as Case 6.4.1, but in 2nd frame, we send only up to and including the octet making the complete payload invalid.
MESSAGE PARTS:
-PART1 = κόσμε� (cebae1bdb9cf83cebcceb5f4)
-PART2 = � (90)
-PART3 = ��edited (8080656469746564)
+PART1 = κόσμε� (cebae1bdb9cf83cebcceb5f4)
+PART2 = � (90)
+PART3 = ��edited (8080656469746564)
Case Expectation
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Description
Same as Case 6.4.1, but we send message not in 3 frames, but in 3 chops of the same message frame.
MESSAGE PARTS:
PART1 = κόσμε (cebae1bdb9cf83cebcceb5)
-PART2 = ���� (f4908080)
+PART2 = ���� (f4908080)
PART3 = edited (656469746564)
Case Expectation
The first chop is accepted, we expect to timeout on the first wait. The 2nd chop should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Description
Same as Case 6.4.2, but we send message not in 3 frames, but in 3 chops of the same message frame.
MESSAGE PARTS:
-PART1 = κόσμε� (cebae1bdb9cf83cebcceb5f4)
-PART2 = � (90)
+PART1 = κόσμε� (cebae1bdb9cf83cebcceb5f4)
+PART2 = � (90)
PART3 = ()
Case Expectation
The first chop is accepted, we expect to timeout on the first wait. The 2nd chop should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
ce
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
ce
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κ�
cebae1
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κ�
cebae1
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κ�
cebae1bd
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κ�
cebae1bd
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κό�
cebae1bdb9cf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κό�
cebae1bdb9cf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κόσ�
cebae1bdb9cf83ce
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κόσ�
cebae1bdb9cf83ce
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κόσμ�
cebae1bdb9cf83cebcce
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κόσμ�
cebae1bdb9cf83cebcce
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f888808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f888808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc8480808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc8480808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f7bfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f7bfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fbbfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fbbfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fdbfbfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fdbfbfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f4908080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f4908080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
80bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
80bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
80bf80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
80bf80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
80bf80bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
80bf80bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
80bf80bf80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
80bf80bf80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
80bf80bf80bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
80bf80bf80bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���������������������������������������������������������������
808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbe
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���������������������������������������������������������������
808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbe
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
c020c120c220c320c420c520c620c720c820c920ca20cb20cc20cd20ce20cf20d020d120d220d320d420d520d620d720d820d920da20db20dc20dd20de20
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
c020c120c220c320c420c520c620c720c820c920ca20cb20cc20cd20ce20cf20d020d120d220d320d420d520d620d720d820d920da20db20dc20dd20de20
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � � � � � � � � � �
e020e120e220e320e420e520e620e720e820e920ea20eb20ec20ed20ee20
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � � � � � � � � � �
e020e120e220e320e420e520e620e720e820e920ea20eb20ec20ed20ee20
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � �
f020f120f220f320f420f520f620
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � �
f020f120f220f320f420f520f620
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � �
f820f920fa20
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � �
f820f920fa20
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
fc20
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
fc20
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
c0
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
c0
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
e080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
e080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
f08080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
f08080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f8808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f8808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fc80808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fc80808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
df
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
df
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
efbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
efbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
f7bfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
f7bfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
fbbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
fbbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fdbfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fdbfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����������������������������
c0e080f08080f8808080fc80808080dfefbff7bfbffbbfbfbffdbfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����������������������������
c0e080f08080f8808080fc80808080dfefbff7bfbffbbfbfbffdbfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
fe
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
fe
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
ff
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
ff
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
fefeffff
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
fefeffff
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c0af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c0af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e080af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e080af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f08080af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f08080af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f8808080af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f8808080af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc80808080af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc80808080af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c1bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c1bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e09fbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e09fbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f08fbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f08fbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f887bfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f887bfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc83bfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc83bfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e08080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e08080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f0808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f0808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f880808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f880808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc8080808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc8080808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
eda080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
eda080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edadbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edadbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edae80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edae80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edafbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edafbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edbe80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edbe80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
eda080edb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
eda080edb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
eda080edbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
eda080edbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edadbfedb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edadbfedb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edadbfedbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edadbfedbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edae80edb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edae80edb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edae80edbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edae80edbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edafbfedb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edafbfedb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edafbfedbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edafbfedbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send 256K message followed by close then a ping
Case Expectation
Case outcome depends on implimentation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asyncronous processing models) the close frame is processed first and the text message may not be recieved or may only be partially recieved.
Case Expectation
Case outcome depends on implimentation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asyncronous processing models) the close frame is processed first and the text message may not be received or may only be partially received.
Case Description
Send 256K message followed by close then a ping
Case Expectation
Case outcome depends on implementation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asynchronous processing models) the close frame is processed first and the text message may not be received or may only be partially recieved.
Case Expectation
Case outcome depends on implementation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asynchronous processing models) the close frame is processed first and the text message may not be received or may only be partially received.
* Modified by marci4 to allow the usage as a ByteChannel *
- * Permission for usage recieved at May 25, 2017 by Alex Karnezis
+ * Permission for usage received at May 25, 2017 by Alex Karnezis
*/
public class SSLSocketChannel implements WrappedByteChannel, ByteChannel, ISSLChannel {
@@ -214,7 +214,7 @@ public synchronized int write( ByteBuffer output ) throws IOException {
myNetData = enlargePacketBuffer( myNetData );
break;
case BUFFER_UNDERFLOW:
- throw new SSLException( "Buffer underflow occured after a wrap. I don't think we should ever get here." );
+ throw new SSLException( "Buffer underflow occurred after a wrap. I don't think we should ever get here." );
case CLOSED:
closeConnection();
return 0;
@@ -283,7 +283,7 @@ private boolean doHandshake() throws IOException {
try {
engine.closeInbound();
} catch ( SSLException e ) {
- //Ignore, cant do anything against this exception
+ //Ignore, can't do anything against this exception
}
engine.closeOutbound();
// After closeOutbound the engine will be set to WRAP state, in order to try to send a close message to the client.
@@ -347,7 +347,7 @@ private boolean doHandshake() throws IOException {
myNetData = enlargePacketBuffer( myNetData );
break;
case BUFFER_UNDERFLOW:
- throw new SSLException( "Buffer underflow occured after a wrap. I don't think we should ever get here." );
+ throw new SSLException( "Buffer underflow occurred after a wrap. I don't think we should ever get here." );
case CLOSED:
try {
myNetData.flip();
diff --git a/src/main/java/org/java_websocket/SSLSocketChannel2.java b/src/main/java/org/java_websocket/SSLSocketChannel2.java
index e2fb0acc0..ae9669d49 100644
--- a/src/main/java/org/java_websocket/SSLSocketChannel2.java
+++ b/src/main/java/org/java_websocket/SSLSocketChannel2.java
@@ -315,11 +315,11 @@ public int read(ByteBuffer dst) throws IOException {
inCrypt.flip();
unwrap();
- int transfered = transfereTo(inData, dst);
- if (transfered == 0 && isBlocking()) {
+ int transferred = transfereTo(inData, dst);
+ if (transferred == 0 && isBlocking()) {
continue;
}
- return transfered;
+ return transferred;
}
}
/**
diff --git a/src/main/java/org/java_websocket/WebSocket.java b/src/main/java/org/java_websocket/WebSocket.java
index c4d0441c7..c5a80797a 100644
--- a/src/main/java/org/java_websocket/WebSocket.java
+++ b/src/main/java/org/java_websocket/WebSocket.java
@@ -59,7 +59,7 @@ public interface WebSocket {
/**
* This will close the connection immediately without a proper close handshake.
- * The code and the message therefore won't be transfered over the wire also they will be forwarded to onClose/onWebsocketClose.
+ * The code and the message therefore won't be transferred over the wire also they will be forwarded to onClose/onWebsocketClose.
* @param code the closing code
* @param message the closing message
**/
diff --git a/src/main/java/org/java_websocket/WebSocketImpl.java b/src/main/java/org/java_websocket/WebSocketImpl.java
index f553a21cf..385451c6c 100644
--- a/src/main/java/org/java_websocket/WebSocketImpl.java
+++ b/src/main/java/org/java_websocket/WebSocketImpl.java
@@ -152,7 +152,7 @@ public class WebSocketImpl implements WebSocket {
private String resourceDescriptor = null;
/**
- * Attribute, when the last pong was recieved
+ * Attribute, when the last pong was received
*/
private long lastPong = System.nanoTime();
@@ -483,7 +483,7 @@ public void close( int code, String message ) {
/**
* This will close the connection immediately without a proper close handshake.
- * The code and the message therefore won't be transfered over the wire also they will be forwarded to onClose/onWebsocketClose.
+ * The code and the message therefore won't be transferred over the wire also they will be forwarded to onClose/onWebsocketClose.
*
* @param code the closing code
* @param message the closing message
@@ -789,9 +789,9 @@ public String getResourceDescriptor() {
}
/**
- * Getter for the last pong recieved
+ * Getter for the last pong received
*
- * @return the timestamp for the last recieved pong
+ * @return the timestamp for the last received pong
*/
long getLastPong() {
return lastPong;
diff --git a/src/main/java/org/java_websocket/WebSocketListener.java b/src/main/java/org/java_websocket/WebSocketListener.java
index 23cdaef59..7271100c4 100644
--- a/src/main/java/org/java_websocket/WebSocketListener.java
+++ b/src/main/java/org/java_websocket/WebSocketListener.java
@@ -117,7 +117,7 @@ public interface WebSocketListener {
* Indicates that a complete WebSocket connection has been established,
* and we are ready to send/receive data.
*
- * @param conn The WebSocket instance this event is occuring on.
+ * @param conn The WebSocket instance this event is occurring on.
* @param d The handshake of the websocket instance
*/
void onWebsocketOpen( WebSocket conn, Handshakedata d );
@@ -126,7 +126,7 @@ public interface WebSocketListener {
* Called after WebSocket#close is explicity called, or when the
* other end of the WebSocket connection is closed.
*
- * @param ws The WebSocket instance this event is occuring on.
+ * @param ws The WebSocket instance this event is occurring on.
* @param code The codes can be looked up here: {@link CloseFrame}
* @param reason Additional information string
* @param remote Returns whether or not the closing of the connection was initiated by the remote host.
@@ -135,7 +135,7 @@ public interface WebSocketListener {
/** Called as soon as no further frames are accepted
*
- * @param ws The WebSocket instance this event is occuring on.
+ * @param ws The WebSocket instance this event is occurring on.
* @param code The codes can be looked up here: {@link CloseFrame}
* @param reason Additional information string
* @param remote Returns whether or not the closing of the connection was initiated by the remote host.
@@ -144,7 +144,7 @@ public interface WebSocketListener {
/** send when this peer sends a close handshake
*
- * @param ws The WebSocket instance this event is occuring on.
+ * @param ws The WebSocket instance this event is occurring on.
* @param code The codes can be looked up here: {@link CloseFrame}
* @param reason Additional information string
*/
@@ -154,7 +154,7 @@ public interface WebSocketListener {
* Called if an exception worth noting occurred.
* If an error causes the connection to fail onClose will be called additionally afterwards.
*
- * @param conn The WebSocket instance this event is occuring on.
+ * @param conn The WebSocket instance this event is occurring on.
* @param ex
* The exception that occurred.
* Might be null if the exception is not related to any specific connection. For example if the server port could not be bound.
@@ -165,7 +165,7 @@ public interface WebSocketListener {
* Called a ping frame has been received.
* This method must send a corresponding pong by itself.
*
- * @param conn The WebSocket instance this event is occuring on.
+ * @param conn The WebSocket instance this event is occurring on.
* @param f The ping frame. Control frames may contain payload.
*/
void onWebsocketPing( WebSocket conn, Framedata f );
@@ -181,20 +181,20 @@ public interface WebSocketListener {
/**
* Called when a pong frame is received.
*
- * @param conn The WebSocket instance this event is occuring on.
+ * @param conn The WebSocket instance this event is occurring on.
* @param f The pong frame. Control frames may contain payload.
**/
void onWebsocketPong( WebSocket conn, Framedata f );
/** This method is used to inform the selector thread that there is data queued to be written to the socket.
- * @param conn The WebSocket instance this event is occuring on.
+ * @param conn The WebSocket instance this event is occurring on.
*/
void onWriteDemand( WebSocket conn );
/**
* @see WebSocket#getLocalSocketAddress()
*
- * @param conn The WebSocket instance this event is occuring on.
+ * @param conn The WebSocket instance this event is occurring on.
* @return Returns the address of the endpoint this socket is bound to.
*/
InetSocketAddress getLocalSocketAddress( WebSocket conn );
@@ -202,7 +202,7 @@ public interface WebSocketListener {
/**
* @see WebSocket#getRemoteSocketAddress()
*
- * @param conn The WebSocket instance this event is occuring on.
+ * @param conn The WebSocket instance this event is occurring on.
* @return Returns the address of the endpoint this socket is connected to, or{@code null} if it is unconnected.
*/
InetSocketAddress getRemoteSocketAddress( WebSocket conn );
diff --git a/src/main/java/org/java_websocket/drafts/Draft.java b/src/main/java/org/java_websocket/drafts/Draft.java
index 77d5d19bb..3fb040c9b 100644
--- a/src/main/java/org/java_websocket/drafts/Draft.java
+++ b/src/main/java/org/java_websocket/drafts/Draft.java
@@ -51,7 +51,7 @@
import org.java_websocket.util.Charsetfunctions;
/**
- * Base class for everything of a websocket specification which is not common such as the way the handshake is read or frames are transfered.
+ * Base class for everything of a websocket specification which is not common such as the way the handshake is read or frames are transferred.
**/
public abstract class Draft {
diff --git a/src/main/java/org/java_websocket/exceptions/IncompleteHandshakeException.java b/src/main/java/org/java_websocket/exceptions/IncompleteHandshakeException.java
index 0125ae342..80c5bc82a 100644
--- a/src/main/java/org/java_websocket/exceptions/IncompleteHandshakeException.java
+++ b/src/main/java/org/java_websocket/exceptions/IncompleteHandshakeException.java
@@ -26,7 +26,7 @@
package org.java_websocket.exceptions;
/**
- * exception which indicates that a incomplete handshake was recieved
+ * exception which indicates that a incomplete handshake was received
*/
public class IncompleteHandshakeException extends RuntimeException {
@@ -36,14 +36,14 @@ public class IncompleteHandshakeException extends RuntimeException {
private static final long serialVersionUID = 7906596804233893092L;
/**
- * attribut which size of handshake would have been prefered
+ * attribut which size of handshake would have been preferred
*/
private final int preferredSize;
/**
* constructor for a IncompleteHandshakeException
*
- * @param preferredSize the prefered size + * @param preferredSize the preferred size */ public IncompleteHandshakeException(int preferredSize) { this.preferredSize = preferredSize; diff --git a/src/main/java/org/java_websocket/exceptions/InvalidDataException.java b/src/main/java/org/java_websocket/exceptions/InvalidDataException.java index ec79a1625..af5eaf9e5 100644 --- a/src/main/java/org/java_websocket/exceptions/InvalidDataException.java +++ b/src/main/java/org/java_websocket/exceptions/InvalidDataException.java @@ -26,7 +26,7 @@ package org.java_websocket.exceptions; /** - * exception which indicates that a invalid data was recieved + * exception which indicates that a invalid data was received */ public class InvalidDataException extends Exception { diff --git a/src/main/java/org/java_websocket/exceptions/InvalidFrameException.java b/src/main/java/org/java_websocket/exceptions/InvalidFrameException.java index 336fef91b..9d5ed55c9 100644 --- a/src/main/java/org/java_websocket/exceptions/InvalidFrameException.java +++ b/src/main/java/org/java_websocket/exceptions/InvalidFrameException.java @@ -28,7 +28,7 @@ import org.java_websocket.framing.CloseFrame; /** - * exception which indicates that a invalid frame was recieved (CloseFrame.PROTOCOL_ERROR) + * exception which indicates that a invalid frame was received (CloseFrame.PROTOCOL_ERROR) */ public class InvalidFrameException extends InvalidDataException { diff --git a/src/main/java/org/java_websocket/exceptions/InvalidHandshakeException.java b/src/main/java/org/java_websocket/exceptions/InvalidHandshakeException.java index 7aa6881e0..12209ec6f 100644 --- a/src/main/java/org/java_websocket/exceptions/InvalidHandshakeException.java +++ b/src/main/java/org/java_websocket/exceptions/InvalidHandshakeException.java @@ -28,7 +28,7 @@ import org.java_websocket.framing.CloseFrame; /** - * exception which indicates that a invalid handshake was recieved (CloseFrame.PROTOCOL_ERROR) + * exception which indicates that a invalid handshake was received (CloseFrame.PROTOCOL_ERROR) */ public class InvalidHandshakeException extends InvalidDataException { diff --git a/src/main/java/org/java_websocket/framing/CloseFrame.java b/src/main/java/org/java_websocket/framing/CloseFrame.java index 61e85fbdd..229b24822 100644 --- a/src/main/java/org/java_websocket/framing/CloseFrame.java +++ b/src/main/java/org/java_websocket/framing/CloseFrame.java @@ -190,7 +190,7 @@ public CloseFrame() { */ public void setCode(int code) { this.code = code; - // CloseFrame.TLS_ERROR is not allowed to be transfered over the wire + // CloseFrame.TLS_ERROR is not allowed to be transferred over the wire if (code == CloseFrame.TLS_ERROR) { this.code = CloseFrame.NOCODE; this.reason = ""; diff --git a/src/main/java/org/java_websocket/framing/ControlFrame.java b/src/main/java/org/java_websocket/framing/ControlFrame.java index fd088df65..e8848ed84 100644 --- a/src/main/java/org/java_websocket/framing/ControlFrame.java +++ b/src/main/java/org/java_websocket/framing/ControlFrame.java @@ -45,16 +45,16 @@ public ControlFrame( Opcode opcode ) { @Override public void isValid() throws InvalidDataException { if( !isFin() ) { - throw new InvalidFrameException( "Control frame cant have fin==false set" ); + throw new InvalidFrameException( "Control frame can't have fin==false set" ); } if( isRSV1() ) { - throw new InvalidFrameException( "Control frame cant have rsv1==true set" ); + throw new InvalidFrameException( "Control frame can't have rsv1==true set" ); } if( isRSV2() ) { - throw new InvalidFrameException( "Control frame cant have rsv2==true set" ); + throw new InvalidFrameException( "Control frame can't have rsv2==true set" ); } if( isRSV3() ) { - throw new InvalidFrameException( "Control frame cant have rsv3==true set" ); + throw new InvalidFrameException( "Control frame can't have rsv3==true set" ); } } } diff --git a/src/main/java/org/java_websocket/server/WebSocketServer.java b/src/main/java/org/java_websocket/server/WebSocketServer.java index f7349a6d7..3dd79028f 100644 --- a/src/main/java/org/java_websocket/server/WebSocketServer.java +++ b/src/main/java/org/java_websocket/server/WebSocketServer.java @@ -718,7 +718,7 @@ protected boolean removeConnection( WebSocket ws ) { removed = this.connections.remove( ws ); } else { //Don't throw an assert error if the ws is not in the list. e.g. when the other endpoint did not send any handshake. see #512 - log.trace("Removing connection which is not in the connections collection! Possible no handshake recieved! {}", ws); + log.trace("Removing connection which is not in the connections collection! Possible no handshake received! {}", ws); } } if( isclosed.get() && connections.isEmpty() ) { @@ -823,14 +823,14 @@ public InetSocketAddress getRemoteSocketAddress( WebSocket conn ) { } /** Called after an opening handshake has been performed and the given websocket is ready to be written on. - * @param conn The WebSocket instance this event is occuring on. + * @param conn The WebSocket instance this event is occurring on. * @param handshake The handshake of the websocket instance */ public abstract void onOpen( WebSocket conn, ClientHandshake handshake ); /** * Called after the websocket connection has been closed. * - * @param conn The WebSocket instance this event is occuring on. + * @param conn The WebSocket instance this event is occurring on. * @param code * The codes can be looked up here: {@link CloseFrame} * @param reason @@ -843,7 +843,7 @@ public InetSocketAddress getRemoteSocketAddress( WebSocket conn ) { * Callback for string messages received from the remote host * * @see #onMessage(WebSocket, ByteBuffer) - * @param conn The WebSocket instance this event is occuring on. + * @param conn The WebSocket instance this event is occurring on. * @param message The UTF-8 decoded message that was received. **/ public abstract void onMessage( WebSocket conn, String message ); @@ -860,7 +860,7 @@ public InetSocketAddress getRemoteSocketAddress( WebSocket conn ) { /** * Called when the server started up successfully. * - * If any error occured, onError is called instead. + * If any error occurred, onError is called instead. */ public abstract void onStart(); diff --git a/src/main/java/org/java_websocket/util/Base64.java b/src/main/java/org/java_websocket/util/Base64.java index ceda3a577..9ca6b5469 100644 --- a/src/main/java/org/java_websocket/util/Base64.java +++ b/src/main/java/org/java_websocket/util/Base64.java @@ -97,7 +97,7 @@ * RFC3548. *
This is the lowest level of the encoding methods with * all possible parameters.
* * @param source the array to convert * @param srcOffset the index where conversion begins - * @param numSigBytes the number of significant bytes in your array + * @param numSigBytes the number of significan't bytes in your array * @param destination the array to hold the conversion * @param destOffset the index where output will be put * @return the destination array @@ -517,7 +517,7 @@ private static byte[] encode3to4( // 0x3f 0x3f 0x3f Additional AND // Create buffer with zero-padding if there are only one or two - // significant bytes passed in the array. + // significan't bytes passed in the array. // We have to shift left 24 in order to flush out the 1's that appear // when Java treats a value as negative that is cast from a byte to an int. int inBuff = ( numSigBytes > 0 ? ((source[ srcOffset ] << 24) >>> 8) : 0 ) @@ -762,7 +762,7 @@ public static byte[] encodeBytesToBytes( byte[] source, int off, int len, int op * anywhere along their length by specifying * srcOffset and destOffset. * This method does not check to make sure your arrays - * are large enough to accomodate srcOffset + 4 for + * are large enough to accommodate srcOffset + 4 for * the source array or destOffset + 3 for * the destination array. * This method returns the actual number of bytes that diff --git a/src/test/java/org/java_websocket/framing/BinaryFrameTest.java b/src/test/java/org/java_websocket/framing/BinaryFrameTest.java index 994660652..a7cf127b6 100644 --- a/src/test/java/org/java_websocket/framing/BinaryFrameTest.java +++ b/src/test/java/org/java_websocket/framing/BinaryFrameTest.java @@ -42,7 +42,7 @@ public void testConstructor() { BinaryFrame frame = new BinaryFrame(); assertEquals("Opcode must be equal", Opcode.BINARY , frame.getOpcode()); assertEquals("Fin must be set", true , frame.isFin()); - assertEquals("TransferedMask must not be set", false , frame.getTransfereMasked()); + assertEquals("transferredMask must not be set", false , frame.getTransfereMasked()); assertEquals("Payload must be empty", 0 , frame.getPayloadData().capacity()); assertEquals("RSV1 must be false", false , frame.isRSV1()); assertEquals("RSV2 must be false", false , frame.isRSV2()); diff --git a/src/test/java/org/java_websocket/framing/CloseFrameTest.java b/src/test/java/org/java_websocket/framing/CloseFrameTest.java index 1246e926c..33a9cc4d0 100644 --- a/src/test/java/org/java_websocket/framing/CloseFrameTest.java +++ b/src/test/java/org/java_websocket/framing/CloseFrameTest.java @@ -42,7 +42,7 @@ public void testConstructor() { CloseFrame frame = new CloseFrame(); assertEquals("Opcode must be equal", Opcode.CLOSING, frame.getOpcode()); assertEquals("Fin must be set", true, frame.isFin()); - assertEquals("TransferedMask must not be set", false, frame.getTransfereMasked()); + assertEquals("transferredMask must not be set", false, frame.getTransfereMasked()); assertEquals("Payload must be 2 (close code)", 2, frame.getPayloadData().capacity()); assertEquals("RSV1 must be false", false, frame.isRSV1()); assertEquals("RSV2 must be false", false, frame.isRSV2()); diff --git a/src/test/java/org/java_websocket/framing/ContinuousFrameTest.java b/src/test/java/org/java_websocket/framing/ContinuousFrameTest.java index a6ea68e11..6319fcca5 100644 --- a/src/test/java/org/java_websocket/framing/ContinuousFrameTest.java +++ b/src/test/java/org/java_websocket/framing/ContinuousFrameTest.java @@ -42,7 +42,7 @@ public void testConstructor() { ContinuousFrame frame = new ContinuousFrame(); assertEquals("Opcode must be equal", Opcode.CONTINUOUS , frame.getOpcode()); assertEquals("Fin must be set", true , frame.isFin()); - assertEquals("TransferedMask must not be set", false , frame.getTransfereMasked()); + assertEquals("transferredMask must not be set", false , frame.getTransfereMasked()); assertEquals("Payload must be empty", 0 , frame.getPayloadData().capacity()); assertEquals("RSV1 must be false", false , frame.isRSV1()); assertEquals("RSV2 must be false", false , frame.isRSV2()); diff --git a/src/test/java/org/java_websocket/framing/FramedataImpl1Test.java b/src/test/java/org/java_websocket/framing/FramedataImpl1Test.java index fbfaa256e..6a29abe8d 100644 --- a/src/test/java/org/java_websocket/framing/FramedataImpl1Test.java +++ b/src/test/java/org/java_websocket/framing/FramedataImpl1Test.java @@ -44,7 +44,7 @@ public void testDefaultValues() { FramedataImpl1 binary = FramedataImpl1.get(Opcode.BINARY); assertEquals("Opcode must be equal", Opcode.BINARY, binary.getOpcode()); assertEquals("Fin must be set", true, binary.isFin()); - assertEquals("TransferedMask must not be set", false, binary.getTransfereMasked()); + assertEquals("transferredMask must not be set", false, binary.getTransfereMasked()); assertEquals("Payload must be empty", 0, binary.getPayloadData().capacity()); assertEquals("RSV1 must be false", false, binary.isRSV1()); assertEquals("RSV2 must be false", false, binary.isRSV2()); @@ -79,7 +79,7 @@ public void testSetters() { frame.setFin(false); assertEquals("Fin must not be set", false, frame.isFin()); frame.setTransferemasked(true); - assertEquals("TransferedMask must be set", true, frame.getTransfereMasked()); + assertEquals("transferredMask must be set", true, frame.getTransfereMasked()); ByteBuffer buffer = ByteBuffer.allocate(100); frame.setPayload(buffer); assertEquals("Payload must be of size 100", 100, frame.getPayloadData().capacity()); diff --git a/src/test/java/org/java_websocket/framing/PingFrameTest.java b/src/test/java/org/java_websocket/framing/PingFrameTest.java index 2056d31b0..ffcd2070b 100644 --- a/src/test/java/org/java_websocket/framing/PingFrameTest.java +++ b/src/test/java/org/java_websocket/framing/PingFrameTest.java @@ -42,7 +42,7 @@ public void testConstructor() { PingFrame frame = new PingFrame(); assertEquals("Opcode must be equal", Opcode.PING , frame.getOpcode()); assertEquals("Fin must be set", true , frame.isFin()); - assertEquals("TransferedMask must not be set", false , frame.getTransfereMasked()); + assertEquals("transferredMask must not be set", false , frame.getTransfereMasked()); assertEquals("Payload must be empty", 0 , frame.getPayloadData().capacity()); assertEquals("RSV1 must be false", false , frame.isRSV1()); assertEquals("RSV2 must be false", false , frame.isRSV2()); diff --git a/src/test/java/org/java_websocket/framing/PongFrameTest.java b/src/test/java/org/java_websocket/framing/PongFrameTest.java index 03bb316ed..c19a3ca57 100644 --- a/src/test/java/org/java_websocket/framing/PongFrameTest.java +++ b/src/test/java/org/java_websocket/framing/PongFrameTest.java @@ -44,7 +44,7 @@ public void testConstructor() { PongFrame frame = new PongFrame(); assertEquals("Opcode must be equal", Opcode.PONG , frame.getOpcode()); assertEquals("Fin must be set", true , frame.isFin()); - assertEquals("TransferedMask must not be set", false , frame.getTransfereMasked()); + assertEquals("transferredMask must not be set", false , frame.getTransfereMasked()); assertEquals("Payload must be empty", 0 , frame.getPayloadData().capacity()); assertEquals("RSV1 must be false", false , frame.isRSV1()); assertEquals("RSV2 must be false", false , frame.isRSV2()); diff --git a/src/test/java/org/java_websocket/framing/TextFrameTest.java b/src/test/java/org/java_websocket/framing/TextFrameTest.java index 433e89962..6c1a07b7f 100644 --- a/src/test/java/org/java_websocket/framing/TextFrameTest.java +++ b/src/test/java/org/java_websocket/framing/TextFrameTest.java @@ -44,7 +44,7 @@ public void testConstructor() { TextFrame frame = new TextFrame(); assertEquals("Opcode must be equal", Opcode.TEXT , frame.getOpcode()); assertEquals("Fin must be set", true , frame.isFin()); - assertEquals("TransferedMask must not be set", false , frame.getTransfereMasked()); + assertEquals("transferredMask must not be set", false , frame.getTransfereMasked()); assertEquals("Payload must be empty", 0 , frame.getPayloadData().capacity()); assertEquals("RSV1 must be false", false , frame.isRSV1()); assertEquals("RSV2 must be false", false , frame.isRSV2()); From 92979c530566c4cda1f194e56b5fed584a01db87 Mon Sep 17 00:00:00 2001 From: dota17Case Description
Send invalid UTF-8 text message unfragmented.
MESSAGE:
κόσμε�edited
cebae1bdb9cf83cebcceb5eda080656469746564
Case Description
Send invalid UTF-8 text message unfragmented.
MESSAGE:
κόσμε���edited
cebae1bdb9cf83cebcceb5eda080656469746564
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send invalid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
κόσμε�edited
cebae1bdb9cf83cebcceb5eda080656469746564
Case Description
Send invalid UTF-8 text message in fragments of 1 octet, resulting in frames ending on positions which are not code point ends.
MESSAGE:
κόσμε���edited
cebae1bdb9cf83cebcceb5eda080656469746564
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Expectation
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Description
Same as Case 6.4.1, but in 2nd frame, we send only up to and including the octet making the complete payload invalid.
MESSAGE PARTS:
-PART1 = κόσμε� (cebae1bdb9cf83cebcceb5f4)
-PART2 = � (90)
-PART3 = ��edited (8080656469746564)
+PART1 = κόσμε� (cebae1bdb9cf83cebcceb5f4)
+PART2 = � (90)
+PART3 = ��edited (8080656469746564)
Case Expectation
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Description
Same as Case 6.4.1, but we send message not in 3 frames, but in 3 chops of the same message frame.
MESSAGE PARTS:
PART1 = κόσμε (cebae1bdb9cf83cebcceb5)
-PART2 = ���� (f4908080)
+PART2 = ���� (f4908080)
PART3 = edited (656469746564)
Case Expectation
The first chop is accepted, we expect to timeout on the first wait. The 2nd chop should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Description
Same as Case 6.4.2, but we send message not in 3 frames, but in 3 chops of the same message frame.
MESSAGE PARTS:
-PART1 = κόσμε� (cebae1bdb9cf83cebcceb5f4)
-PART2 = � (90)
+PART1 = κόσμε� (cebae1bdb9cf83cebcceb5f4)
+PART2 = � (90)
PART3 = ()
Case Expectation
The first chop is accepted, we expect to timeout on the first wait. The 2nd chop should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
ce
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
ce
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κ�
cebae1
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κ�
cebae1
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κ�
cebae1bd
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κ�
cebae1bd
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κό�
cebae1bdb9cf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κό�
cebae1bdb9cf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κόσ�
cebae1bdb9cf83ce
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κόσ�
cebae1bdb9cf83ce
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κόσμ�
cebae1bdb9cf83cebcce
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
κόσμ�
cebae1bdb9cf83cebcce
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f888808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f888808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc8480808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc8480808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f7bfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f7bfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fbbfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fbbfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fdbfbfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fdbfbfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f4908080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f4908080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
80bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
80bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
80bf80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
80bf80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
80bf80bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
80bf80bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
80bf80bf80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
80bf80bf80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
80bf80bf80bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
80bf80bf80bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���������������������������������������������������������������
808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbe
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���������������������������������������������������������������
808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbe
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
c020c120c220c320c420c520c620c720c820c920ca20cb20cc20cd20ce20cf20d020d120d220d320d420d520d620d720d820d920da20db20dc20dd20de20
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
c020c120c220c320c420c520c620c720c820c920ca20cb20cc20cd20ce20cf20d020d120d220d320d420d520d620d720d820d920da20db20dc20dd20de20
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � � � � � � � � � �
e020e120e220e320e420e520e620e720e820e920ea20eb20ec20ed20ee20
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � � � � � � � � � �
e020e120e220e320e420e520e620e720e820e920ea20eb20ec20ed20ee20
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � �
f020f120f220f320f420f520f620
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � � � � � �
f020f120f220f320f420f520f620
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � �
f820f920fa20
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
� � �
f820f920fa20
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
fc20
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
fc20
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
c0
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
c0
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
e080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
e080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
f08080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
f08080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f8808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f8808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fc80808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fc80808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
df
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
df
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
efbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
efbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
f7bfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
f7bfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
fbbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
fbbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fdbfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
fdbfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����������������������������
c0e080f08080f8808080fc80808080dfefbff7bfbffbbfbfbffdbfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����������������������������
c0e080f08080f8808080fc80808080dfefbff7bfbffbbfbfbffdbfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
fe
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
fe
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
ff
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
ff
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
fefeffff
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
fefeffff
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c0af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c0af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e080af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e080af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f08080af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f08080af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f8808080af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f8808080af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc80808080af
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc80808080af
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c1bf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c1bf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e09fbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e09fbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f08fbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f08fbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f887bfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f887bfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc83bfbfbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc83bfbfbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
c080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e08080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
e08080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f0808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
����
f0808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f880808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�����
f880808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc8080808080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
fc8080808080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
eda080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
eda080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edadbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edadbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edae80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edae80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edafbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edafbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edbe80
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edbe80
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
�
edbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
���
edbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
eda080edb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
eda080edb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
eda080edbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
eda080edbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edadbfedb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edadbfedb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edadbfedbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edadbfedbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edae80edb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edae80edb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edae80edbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edae80edbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edafbfedb080
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edafbfedb080
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
��
edafbfedbfbf
Case Description
Send a text message with payload which is not valid UTF-8 in one fragment.
MESSAGE:
������
edafbfedbfbf
Case Expectation
The connection is failed immediately, since the payload is not valid UTF-8.
Case Description
Send 256K message followed by close then a ping
Case Expectation
Case outcome depends on implimentation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asyncronous processing models) the close frame is processed first and the text message may not be received or may only be partially received.
Case Expectation
Case outcome depends on implimentation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asyncronous processing models) the close frame is processed first and the text message may not be recieved or may only be partially recieved.
This is the lowest level of the encoding methods with * all possible parameters.
* * @param source the array to convert * @param srcOffset the index where conversion begins - * @param numSigBytes the number of significan't bytes in your array + * @param numSigBytes the number of significant bytes in your array * @param destination the array to hold the conversion * @param destOffset the index where output will be put * @return the destination array @@ -517,7 +517,7 @@ private static byte[] encode3to4( // 0x3f 0x3f 0x3f Additional AND // Create buffer with zero-padding if there are only one or two - // significan't bytes passed in the array. + // significant bytes passed in the array. // We have to shift left 24 in order to flush out the 1's that appear // when Java treats a value as negative that is cast from a byte to an int. int inBuff = ( numSigBytes > 0 ? ((source[ srcOffset ] << 24) >>> 8) : 0 ) From 5f6e8d5487ecb0a176902776a31af3a6be7dd9f8 Mon Sep 17 00:00:00 2001 From: dota17Case Description
Send 256K message followed by close then a ping
Case Expectation
Case outcome depends on implementation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asynchronous processing models) the close frame is processed first and the text message may not be received or may only be partially received.
Case Expectation
Case outcome depends on implementation defined close behavior. Message and close frame are sent back to back. If the close frame is processed before the text message write is complete (as can happen in asynchronous processing models) the close frame is processed first and the text message may not be received or may only be partially recieved.
* Shows how to use the attachment for a WebSocket. This example just uses a simple integer as ID.
* Setting an attachment also works in the WebSocketClient
*/
public class ChatServerAttachmentExample extends WebSocketServer {
- Integer index = 0;
- public ChatServerAttachmentExample( int port ) throws UnknownHostException {
- super( new InetSocketAddress( port ) );
- }
+ Integer index = 0;
+
+ public ChatServerAttachmentExample(int port) throws UnknownHostException {
+ super(new InetSocketAddress(port));
+ }
+
+ public ChatServerAttachmentExample(InetSocketAddress address) {
+ super(address);
+ }
+
+ @Override
+ public void onOpen(WebSocket conn, ClientHandshake handshake) {
+ conn.setAttachment(index); //Set the attachment to the current index
+ index++;
+ // Get the attachment of this connection as Integer
+ System.out.println(
+ conn.getRemoteSocketAddress().getAddress().getHostAddress() + " entered the room! ID: "
+ + conn.
* To see it working, start ServerRejectHandshakeExample and then start this example.
*/
public class CustomHeaderClientExample {
- public static void main( String[] args ) throws URISyntaxException, InterruptedException {
- Map
* For this you have to override onWebsocketHandshakeReceivedAsServer in your WebSocketServer class
- *
+ *
* We are simple adding the additional header "Access-Control-Allow-Origin" to our server response
*/
public class ServerAdditionalHeaderExample extends ChatServer {
- public ServerAdditionalHeaderExample( int port ) {
- super( new InetSocketAddress( port ));
- }
+ public ServerAdditionalHeaderExample(int port) {
+ super(new InetSocketAddress(port));
+ }
- @Override
- public ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer( WebSocket conn, Draft draft, ClientHandshake request) throws InvalidDataException {
- ServerHandshakeBuilder builder = super.onWebsocketHandshakeReceivedAsServer( conn, draft, request );
- builder.put( "Access-Control-Allow-Origin" , "*");
- return builder;
- }
+ @Override
+ public ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer(WebSocket conn, Draft draft,
+ ClientHandshake request) throws InvalidDataException {
+ ServerHandshakeBuilder builder = super
+ .onWebsocketHandshakeReceivedAsServer(conn, draft, request);
+ builder.put("Access-Control-Allow-Origin", "*");
+ return builder;
+ }
- public static void main( String[] args ) throws InterruptedException , IOException {
- int port = 8887; // 843 flash policy port
- try {
- port = Integer.parseInt( args[ 0 ] );
- } catch ( Exception ex ) {
- }
- ServerAdditionalHeaderExample s = new ServerAdditionalHeaderExample( port );
- s.start();
- System.out.println( "Server started on port: " + s.getPort() );
+ public static void main(String[] args) throws InterruptedException, IOException {
+ int port = 8887; // 843 flash policy port
+ try {
+ port = Integer.parseInt(args[0]);
+ } catch (Exception ex) {
+ }
+ ServerAdditionalHeaderExample s = new ServerAdditionalHeaderExample(port);
+ s.start();
+ System.out.println("Server started on port: " + s.getPort());
- BufferedReader sysin = new BufferedReader( new InputStreamReader( System.in ) );
- while ( true ) {
- String in = sysin.readLine();
- s.broadcast( in );
- if( in.equals( "exit" ) ) {
- s.stop(1000);
- break;
- }
- }
- }
+ BufferedReader sysin = new BufferedReader(new InputStreamReader(System.in));
+ while (true) {
+ String in = sysin.readLine();
+ s.broadcast(in);
+ if (in.equals("exit")) {
+ s.stop(1000);
+ break;
+ }
+ }
+ }
}
diff --git a/src/main/example/ServerRejectHandshakeExample.java b/src/main/example/ServerRejectHandshakeExample.java
index de312851e..9c53eb38b 100644
--- a/src/main/example/ServerRejectHandshakeExample.java
+++ b/src/main/example/ServerRejectHandshakeExample.java
@@ -38,58 +38,60 @@
/**
* This example shows how to reject a handshake as a server from a client.
- *
+ *
* For this you have to override onWebsocketHandshakeReceivedAsServer in your WebSocketServer class
*/
public class ServerRejectHandshakeExample extends ChatServer {
- public ServerRejectHandshakeExample( int port ) {
- super( new InetSocketAddress( port ));
- }
+ public ServerRejectHandshakeExample(int port) {
+ super(new InetSocketAddress(port));
+ }
- @Override
- public ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer( WebSocket conn, Draft draft, ClientHandshake request) throws InvalidDataException {
- ServerHandshakeBuilder builder = super.onWebsocketHandshakeReceivedAsServer( conn, draft, request );
- //In this example we don't allow any resource descriptor ( "ws://localhost:8887/?roomid=1 will be rejected but ws://localhost:8887 is fine)
- if (! request.getResourceDescriptor().equals( "/" )) {
- throw new InvalidDataException( CloseFrame.POLICY_VALIDATION, "Not accepted!");
- }
- //If there are no cookies set reject it as well.
- if (!request.hasFieldValue( "Cookie" )) {
- throw new InvalidDataException( CloseFrame.POLICY_VALIDATION, "Not accepted!");
- }
- //If the cookie does not contain a specific value
- if (!request.getFieldValue( "Cookie" ).equals( "username=nemo" )) {
- throw new InvalidDataException( CloseFrame.POLICY_VALIDATION, "Not accepted!");
- }
- //If there is a Origin Field, it has to be localhost:8887
- if (request.hasFieldValue( "Origin" )) {
- if (!request.getFieldValue( "Origin" ).equals( "localhost:8887" )) {
- throw new InvalidDataException( CloseFrame.POLICY_VALIDATION, "Not accepted!");
- }
- }
- return builder;
- }
+ @Override
+ public ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer(WebSocket conn, Draft draft,
+ ClientHandshake request) throws InvalidDataException {
+ ServerHandshakeBuilder builder = super
+ .onWebsocketHandshakeReceivedAsServer(conn, draft, request);
+ //In this example we don't allow any resource descriptor ( "ws://localhost:8887/?roomid=1 will be rejected but ws://localhost:8887 is fine)
+ if (!request.getResourceDescriptor().equals("/")) {
+ throw new InvalidDataException(CloseFrame.POLICY_VALIDATION, "Not accepted!");
+ }
+ //If there are no cookies set reject it as well.
+ if (!request.hasFieldValue("Cookie")) {
+ throw new InvalidDataException(CloseFrame.POLICY_VALIDATION, "Not accepted!");
+ }
+ //If the cookie does not contain a specific value
+ if (!request.getFieldValue("Cookie").equals("username=nemo")) {
+ throw new InvalidDataException(CloseFrame.POLICY_VALIDATION, "Not accepted!");
+ }
+ //If there is a Origin Field, it has to be localhost:8887
+ if (request.hasFieldValue("Origin")) {
+ if (!request.getFieldValue("Origin").equals("localhost:8887")) {
+ throw new InvalidDataException(CloseFrame.POLICY_VALIDATION, "Not accepted!");
+ }
+ }
+ return builder;
+ }
- public static void main( String[] args ) throws InterruptedException , IOException {
- int port = 8887; // 843 flash policy port
- try {
- port = Integer.parseInt( args[ 0 ] );
- } catch ( Exception ex ) {
- }
- ServerRejectHandshakeExample s = new ServerRejectHandshakeExample( port );
- s.start();
- System.out.println( "Server started on port: " + s.getPort() );
+ public static void main(String[] args) throws InterruptedException, IOException {
+ int port = 8887; // 843 flash policy port
+ try {
+ port = Integer.parseInt(args[0]);
+ } catch (Exception ex) {
+ }
+ ServerRejectHandshakeExample s = new ServerRejectHandshakeExample(port);
+ s.start();
+ System.out.println("Server started on port: " + s.getPort());
- BufferedReader sysin = new BufferedReader( new InputStreamReader( System.in ) );
- while ( true ) {
- String in = sysin.readLine();
- s.broadcast( in );
- if( in.equals( "exit" ) ) {
- s.stop(1000);
- break;
- }
- }
- }
+ BufferedReader sysin = new BufferedReader(new InputStreamReader(System.in));
+ while (true) {
+ String in = sysin.readLine();
+ s.broadcast(in);
+ if (in.equals("exit")) {
+ s.stop(1000);
+ break;
+ }
+ }
+ }
}
diff --git a/src/main/example/ServerStressTest.java b/src/main/example/ServerStressTest.java
index e641a0eb3..c15907da4 100644
--- a/src/main/example/ServerStressTest.java
+++ b/src/main/example/ServerStressTest.java
@@ -49,194 +49,202 @@
import org.java_websocket.exceptions.WebsocketNotConnectedException;
public class ServerStressTest extends JFrame {
- private JSlider clients;
- private JSlider interval;
- private JSlider joinrate;
- private JButton start, stop, reset;
- private JLabel joinratelabel = new JLabel();
- private JLabel clientslabel = new JLabel();
- private JLabel intervallabel = new JLabel();
- private JTextField uriinput = new JTextField( "ws://localhost:8887" );
- private JTextArea text = new JTextArea( "payload" );
- private Timer timer = new Timer( true );
- private Thread adjustthread;
-
- private int notyetconnected = 0;
-
- public ServerStressTest() {
- setTitle( "ServerStressTest" );
- setDefaultCloseOperation( EXIT_ON_CLOSE );
- start = new JButton( "Start" );
- start.addActionListener( new ActionListener() {
-
- @Override
- public void actionPerformed( ActionEvent e ) {
- start.setEnabled( false );
- stop.setEnabled( true );
- reset.setEnabled( false );
- interval.setEnabled( false );
- clients.setEnabled( false );
-
- stopAdjust();
- adjustthread = new Thread( new Runnable() {
- @Override
- public void run() {
- try {
- adjust();
- } catch ( InterruptedException e ) {
- System.out.println( "adjust chanced" );
- }
- }
- } );
- adjustthread.start();
-
- }
- } );
- stop = new JButton( "Stop" );
- stop.setEnabled( false );
- stop.addActionListener( new ActionListener() {
-
- @Override
- public void actionPerformed( ActionEvent e ) {
- timer.cancel();
- stopAdjust();
- start.setEnabled( true );
- stop.setEnabled( false );
- reset.setEnabled( true );
- joinrate.setEnabled( true );
- interval.setEnabled( true );
- clients.setEnabled( true );
- }
- } );
- reset = new JButton( "reset" );
- reset.setEnabled( true );
- reset.addActionListener( new ActionListener() {
-
- @Override
- public void actionPerformed( ActionEvent e ) {
- while ( !websockets.isEmpty() )
- websockets.remove( 0 ).close();
-
- }
- } );
- joinrate = new JSlider( 0, 5000 );
- joinrate.addChangeListener( new ChangeListener() {
- @Override
- public void stateChanged( ChangeEvent e ) {
- joinratelabel.setText( "Joinrate: " + joinrate.getValue() + " ms " );
- }
- } );
- clients = new JSlider( 0, 10000 );
- clients.addChangeListener( new ChangeListener() {
-
- @Override
- public void stateChanged( ChangeEvent e ) {
- clientslabel.setText( "Clients: " + clients.getValue() );
-
- }
- } );
- interval = new JSlider( 0, 5000 );
- interval.addChangeListener( new ChangeListener() {
-
- @Override
- public void stateChanged( ChangeEvent e ) {
- intervallabel.setText( "Interval: " + interval.getValue() + " ms " );
-
- }
- } );
-
- setSize( 300, 400 );
- setLayout( new GridLayout( 10, 1, 10, 10 ) );
- add( new JLabel( "URI" ) );
- add( uriinput );
- add( joinratelabel );
- add( joinrate );
- add( clientslabel );
- add( clients );
- add( intervallabel );
- add( interval );
- JPanel south = new JPanel( new FlowLayout( FlowLayout.CENTER ) );
- add( text );
- add( south );
-
- south.add( start );
- south.add( stop );
- south.add( reset );
-
- joinrate.setValue( 200 );
- interval.setValue( 1000 );
- clients.setValue( 1 );
-
- }
-
- List
- * Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm) for new connections
- *
- * @param tcpNoDelay true to enable TCP_NODELAY, false to disable.
- * @since 1.3.3
- */
- public void setTcpNoDelay( boolean tcpNoDelay ) {
- this.tcpNoDelay = tcpNoDelay;
+ /**
+ * Getter to get all the currently available connections
+ *
+ * @return the currently available connections
+ * @since 1.3.4
+ */
+ protected abstract Collection
+ * Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm) for new connections
+ *
+ * @param tcpNoDelay true to enable TCP_NODELAY, false to disable.
+ * @since 1.3.3
+ */
+ public void setTcpNoDelay(boolean tcpNoDelay) {
+ this.tcpNoDelay = tcpNoDelay;
+ }
- /**
- * Tests Tests if SO_REUSEADDR is enabled.
- *
- * @return a boolean indicating whether or not SO_REUSEADDR is enabled.
- * @since 1.3.5
- */
- public boolean isReuseAddr() {
- return reuseAddr;
- }
+ /**
+ * Tests Tests if SO_REUSEADDR is enabled.
+ *
+ * @return a boolean indicating whether or not SO_REUSEADDR is enabled.
+ * @since 1.3.5
+ */
+ public boolean isReuseAddr() {
+ return reuseAddr;
+ }
- /**
- * Setter for soReuseAddr
- *
- * Enable/disable SO_REUSEADDR for the socket
- *
- * @param reuseAddr whether to enable or disable SO_REUSEADDR
- * @since 1.3.5
- */
- public void setReuseAddr( boolean reuseAddr ) {
- this.reuseAddr = reuseAddr;
- }
+ /**
+ * Setter for soReuseAddr
+ *
+ * Enable/disable SO_REUSEADDR for the socket
+ *
+ * @param reuseAddr whether to enable or disable SO_REUSEADDR
+ * @since 1.3.5
+ */
+ public void setReuseAddr(boolean reuseAddr) {
+ this.reuseAddr = reuseAddr;
+ }
}
diff --git a/src/main/java/org/java_websocket/AbstractWrappedByteChannel.java b/src/main/java/org/java_websocket/AbstractWrappedByteChannel.java
index 093c99350..33e6ddcc9 100644
--- a/src/main/java/org/java_websocket/AbstractWrappedByteChannel.java
+++ b/src/main/java/org/java_websocket/AbstractWrappedByteChannel.java
@@ -36,74 +36,76 @@
@Deprecated
public class AbstractWrappedByteChannel implements WrappedByteChannel {
- private final ByteChannel channel;
-
- /**
- * @deprecated
- */
- @Deprecated
- public AbstractWrappedByteChannel( ByteChannel towrap ) {
- this.channel = towrap;
- }
-
- /**
- * @deprecated
- */
- @Deprecated
- public AbstractWrappedByteChannel( WrappedByteChannel towrap ) {
- this.channel = towrap;
- }
-
- @Override
- public int read( ByteBuffer dst ) throws IOException {
- return channel.read( dst );
- }
-
- @Override
- public boolean isOpen() {
- return channel.isOpen();
- }
-
- @Override
- public void close() throws IOException {
- channel.close();
- }
-
- @Override
- public int write( ByteBuffer src ) throws IOException {
- return channel.write( src );
- }
-
- @Override
- public boolean isNeedWrite() {
- return channel instanceof WrappedByteChannel && ((WrappedByteChannel) channel).isNeedWrite();
- }
-
- @Override
- public void writeMore() throws IOException {
- if( channel instanceof WrappedByteChannel )
- ( (WrappedByteChannel) channel ).writeMore();
-
- }
-
- @Override
- public boolean isNeedRead() {
- return channel instanceof WrappedByteChannel && ((WrappedByteChannel) channel).isNeedRead();
-
- }
-
- @Override
- public int readMore( ByteBuffer dst ) throws IOException {
- return channel instanceof WrappedByteChannel ? ( (WrappedByteChannel) channel ).readMore( dst ) : 0;
- }
-
- @Override
- public boolean isBlocking() {
- if( channel instanceof SocketChannel )
- return ( (SocketChannel) channel ).isBlocking();
- else if( channel instanceof WrappedByteChannel )
- return ( (WrappedByteChannel) channel ).isBlocking();
- return false;
- }
+ private final ByteChannel channel;
+
+ /**
+ * @deprecated
+ */
+ @Deprecated
+ public AbstractWrappedByteChannel(ByteChannel towrap) {
+ this.channel = towrap;
+ }
+
+ /**
+ * @deprecated
+ */
+ @Deprecated
+ public AbstractWrappedByteChannel(WrappedByteChannel towrap) {
+ this.channel = towrap;
+ }
+
+ @Override
+ public int read(ByteBuffer dst) throws IOException {
+ return channel.read(dst);
+ }
+
+ @Override
+ public boolean isOpen() {
+ return channel.isOpen();
+ }
+
+ @Override
+ public void close() throws IOException {
+ channel.close();
+ }
+
+ @Override
+ public int write(ByteBuffer src) throws IOException {
+ return channel.write(src);
+ }
+
+ @Override
+ public boolean isNeedWrite() {
+ return channel instanceof WrappedByteChannel && ((WrappedByteChannel) channel).isNeedWrite();
+ }
+
+ @Override
+ public void writeMore() throws IOException {
+ if (channel instanceof WrappedByteChannel) {
+ ((WrappedByteChannel) channel).writeMore();
+ }
+
+ }
+
+ @Override
+ public boolean isNeedRead() {
+ return channel instanceof WrappedByteChannel && ((WrappedByteChannel) channel).isNeedRead();
+
+ }
+
+ @Override
+ public int readMore(ByteBuffer dst) throws IOException {
+ return channel instanceof WrappedByteChannel ? ((WrappedByteChannel) channel).readMore(dst) : 0;
+ }
+
+ @Override
+ public boolean isBlocking() {
+ if (channel instanceof SocketChannel) {
+ return ((SocketChannel) channel).isBlocking();
+ } else if (channel instanceof WrappedByteChannel) {
+ return ((WrappedByteChannel) channel).isBlocking();
+ }
+ return false;
+ }
}
diff --git a/src/main/java/org/java_websocket/SSLSocketChannel.java b/src/main/java/org/java_websocket/SSLSocketChannel.java
index a3c0dc30f..11fc2eab7 100644
--- a/src/main/java/org/java_websocket/SSLSocketChannel.java
+++ b/src/main/java/org/java_websocket/SSLSocketChannel.java
@@ -46,476 +46,495 @@
/**
* A class that represents an SSL/TLS peer, and can be extended to create a client or a server.
- *
- * It makes use of the JSSE framework, and specifically the {@link SSLEngine} logic, which
- * is described by Oracle as "an advanced API, not appropriate for casual use", since
- * it requires the user to implement much of the communication establishment procedure himself.
- * More information about it can be found here: http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLEngine
- *
- * {@link SSLSocketChannel} implements the handshake protocol, required to establish a connection between two peers,
- * which is common for both client and server and provides the abstract {@link SSLSocketChannel#read(ByteBuffer)} and
- * {@link SSLSocketChannel#write(ByteBuffer)} (String)} methods, that need to be implemented by the specific SSL/TLS peer
- * that is going to extend this class.
+ *
+ * It makes use of the JSSE framework, and specifically the {@link SSLEngine} logic, which is
+ * described by Oracle as "an advanced API, not appropriate for casual use", since it requires the
+ * user to implement much of the communication establishment procedure himself. More information
+ * about it can be found here: http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLEngine
+ *
+ * {@link SSLSocketChannel} implements the handshake protocol, required to establish a connection
+ * between two peers, which is common for both client and server and provides the abstract {@link
+ * SSLSocketChannel#read(ByteBuffer)} and {@link SSLSocketChannel#write(ByteBuffer)} (String)}
+ * methods, that need to be implemented by the specific SSL/TLS peer that is going to extend this
+ * class.
*
* @author Alex Karnezis
- *
- * Modified by marci4 to allow the usage as a ByteChannel
- *
- * Permission for usage received at May 25, 2017 by Alex Karnezis
+ *
+ * Modified by marci4 to allow the usage as a ByteChannel
+ *
+ * Permission for usage received at May 25, 2017 by Alex Karnezis
*/
public class SSLSocketChannel implements WrappedByteChannel, ByteChannel, ISSLChannel {
- /**
- * Logger instance
- *
- * @since 1.4.0
- */
- private final Logger log = LoggerFactory.getLogger(SSLSocketChannel.class);
-
- /**
- * The underlying socket channel
- */
- private final SocketChannel socketChannel;
-
- /**
- * The engine which will be used for un-/wrapping of buffers
- */
- private final SSLEngine engine;
-
-
- /**
- * Will contain this peer's application data in plaintext, that will be later encrypted
- * using {@link SSLEngine#wrap(ByteBuffer, ByteBuffer)} and sent to the other peer. This buffer can typically
- * be of any size, as long as it is large enough to contain this peer's outgoing messages.
- * If this peer tries to send a message bigger than buffer's capacity a {@link BufferOverflowException}
- * will be thrown.
- */
- private ByteBuffer myAppData;
-
- /**
- * Will contain this peer's encrypted data, that will be generated after {@link SSLEngine#wrap(ByteBuffer, ByteBuffer)}
- * is applied on {@link SSLSocketChannel#myAppData}. It should be initialized using {@link SSLSession#getPacketBufferSize()},
- * which returns the size up to which, SSL/TLS packets will be generated from the engine under a session.
- * All SSLEngine network buffers should be sized at least this large to avoid insufficient space problems when performing wrap and unwrap calls.
- */
- private ByteBuffer myNetData;
-
- /**
- * Will contain the other peer's (decrypted) application data. It must be large enough to hold the application data
- * from any peer. Can be initialized with {@link SSLSession#getApplicationBufferSize()} for an estimation
- * of the other peer's application data and should be enlarged if this size is not enough.
- */
- private ByteBuffer peerAppData;
-
- /**
- * Will contain the other peer's encrypted data. The SSL/TLS protocols specify that implementations should produce packets containing at most 16 KB of plaintext,
- * so a buffer sized to this value should normally cause no capacity problems. However, some implementations violate the specification and generate large records up to 32 KB.
- * If the {@link SSLEngine#unwrap(ByteBuffer, ByteBuffer)} detects large inbound packets, the buffer sizes returned by SSLSession will be updated dynamically, so the this peer
- * should check for overflow conditions and enlarge the buffer using the session's (updated) buffer size.
- */
- private ByteBuffer peerNetData;
-
- /**
- * Will be used to execute tasks that may emerge during handshake in parallel with the server's main thread.
- */
- private ExecutorService executor;
-
-
- public SSLSocketChannel( SocketChannel inputSocketChannel, SSLEngine inputEngine, ExecutorService inputExecutor, SelectionKey key ) throws IOException {
- if( inputSocketChannel == null || inputEngine == null || executor == inputExecutor )
- throw new IllegalArgumentException( "parameter must not be null" );
-
- this.socketChannel = inputSocketChannel;
- this.engine = inputEngine;
- this.executor = inputExecutor;
- myNetData = ByteBuffer.allocate( engine.getSession().getPacketBufferSize() );
- peerNetData = ByteBuffer.allocate( engine.getSession().getPacketBufferSize() );
- this.engine.beginHandshake();
- if( doHandshake() ) {
- if( key != null ) {
- key.interestOps( key.interestOps() | SelectionKey.OP_WRITE );
- }
- } else {
- try {
- socketChannel.close();
- } catch ( IOException e ) {
- log.error("Exception during the closing of the channel", e);
- }
- }
- }
-
- @Override
- public synchronized int read( ByteBuffer dst ) throws IOException {
- if( !dst.hasRemaining() ) {
- return 0;
- }
- if( peerAppData.hasRemaining() ) {
- peerAppData.flip();
- return ByteBufferUtils.transferByteBuffer( peerAppData, dst );
- }
- peerNetData.compact();
-
- int bytesRead = socketChannel.read( peerNetData );
- /*
- * If bytesRead are 0 put we still have some data in peerNetData still to an unwrap (for testcase 1.1.6)
- */
- if( bytesRead > 0 || peerNetData.hasRemaining() ) {
- peerNetData.flip();
- while( peerNetData.hasRemaining() ) {
- peerAppData.compact();
- SSLEngineResult result;
- try {
- result = engine.unwrap( peerNetData, peerAppData );
- } catch ( SSLException e ) {
- log.error("SSLException during unwrap", e);
- throw e;
- }
- switch(result.getStatus()) {
- case OK:
- peerAppData.flip();
- return ByteBufferUtils.transferByteBuffer( peerAppData, dst );
- case BUFFER_UNDERFLOW:
- peerAppData.flip();
- return ByteBufferUtils.transferByteBuffer( peerAppData, dst );
- case BUFFER_OVERFLOW:
- peerAppData = enlargeApplicationBuffer( peerAppData );
- return read(dst);
- case CLOSED:
- closeConnection();
- dst.clear();
- return -1;
- default:
- throw new IllegalStateException( "Invalid SSL status: " + result.getStatus() );
- }
- }
- } else if( bytesRead < 0 ) {
- handleEndOfStream();
- }
- ByteBufferUtils.transferByteBuffer( peerAppData, dst );
- return bytesRead;
- }
-
- @Override
- public synchronized int write( ByteBuffer output ) throws IOException {
- int num = 0;
- while( output.hasRemaining() ) {
- // The loop has a meaning for (outgoing) messages larger than 16KB.
- // Every wrap call will remove 16KB from the original message and send it to the remote peer.
- myNetData.clear();
- SSLEngineResult result = engine.wrap( output, myNetData );
- switch(result.getStatus()) {
- case OK:
- myNetData.flip();
- while( myNetData.hasRemaining() ) {
- num += socketChannel.write( myNetData );
- }
- break;
- case BUFFER_OVERFLOW:
- myNetData = enlargePacketBuffer( myNetData );
- break;
- case BUFFER_UNDERFLOW:
- throw new SSLException( "Buffer underflow occurred after a wrap. I don't think we should ever get here." );
- case CLOSED:
- closeConnection();
- return 0;
- default:
- throw new IllegalStateException( "Invalid SSL status: " + result.getStatus() );
- }
- }
- return num;
- }
-
- /**
- * Implements the handshake protocol between two peers, required for the establishment of the SSL/TLS connection.
- * During the handshake, encryption configuration information - such as the list of available cipher suites - will be exchanged
- * and if the handshake is successful will lead to an established SSL/TLS session.
- *
- *
- *
+ *
+ *
+ * If the first frame you send is also the last then it is not a fragmented frame and will
+ * received via onMessage instead of onFragmented even though it was send by this method.
+ *
+ * @param op This is only important for the first frame in the sequence. Opcode.TEXT,
+ * Opcode.BINARY are allowed.
+ * @param buffer The buffer which contains the payload. It may have no bytes remaining.
+ * @param fin true means the current frame is the last in the sequence.
+ **/
+ void sendFragmentedFrame(Opcode op, ByteBuffer buffer, boolean fin);
+
+ /**
+ * Checks if the websocket has buffered data
+ *
+ * @return has the websocket buffered data
+ */
+ boolean hasBufferedData();
+
+ /**
+ * Returns the address of the endpoint this socket is connected to, or{@code null} if it is
+ * unconnected.
+ *
+ * @return never returns null
+ */
+ InetSocketAddress getRemoteSocketAddress();
+
+ /**
+ * Returns the address of the endpoint this socket is bound to.
+ *
+ * @return never returns null
+ */
+ InetSocketAddress getLocalSocketAddress();
+
+ /**
+ * Is the websocket in the state OPEN
+ *
+ * @return state equals ReadyState.OPEN
+ */
+ boolean isOpen();
+
+ /**
+ * Is the websocket in the state CLOSING
+ *
+ * @return state equals ReadyState.CLOSING
+ */
+ boolean isClosing();
+
+ /**
+ * Returns true when no further frames may be submitted
+ * This method should never return null. If it's not able to resolve the IP address then it should
+ * throw an UnknownHostException
+ *
+ * @param uri The URI to be resolved
+ * @return The resolved IP address
+ * @throws UnknownHostException if no IP address for the
- * @param preferredSize the preferred size
- */
- public IncompleteHandshakeException(int preferredSize) {
- this.preferredSize = preferredSize;
- }
+ /**
+ * constructor for a IncompleteHandshakeException
+ *
+ *
+ * @param preferredSize the preferred size
+ */
+ public IncompleteHandshakeException(int preferredSize) {
+ this.preferredSize = preferredSize;
+ }
- /**
- * constructor for a IncompleteHandshakeException
- *
- * preferredSize will be 0
- */
- public IncompleteHandshakeException() {
- this.preferredSize = 0;
- }
+ /**
+ * constructor for a IncompleteHandshakeException
+ *
+ * preferredSize will be 0
+ */
+ public IncompleteHandshakeException() {
+ this.preferredSize = 0;
+ }
- /**
- * Getter preferredSize
- *
- * @return the preferredSize
- */
- public int getPreferredSize() {
- return preferredSize;
- }
+ /**
+ * Getter preferredSize
+ *
+ * @return the preferredSize
+ */
+ public int getPreferredSize() {
+ return preferredSize;
+ }
}
diff --git a/src/main/java/org/java_websocket/exceptions/InvalidDataException.java b/src/main/java/org/java_websocket/exceptions/InvalidDataException.java
index 885cf4545..c34c8c941 100644
--- a/src/main/java/org/java_websocket/exceptions/InvalidDataException.java
+++ b/src/main/java/org/java_websocket/exceptions/InvalidDataException.java
@@ -30,66 +30,66 @@
*/
public class InvalidDataException extends Exception {
- /**
- * Serializable
- */
- private static final long serialVersionUID = 3731842424390998726L;
+ /**
+ * Serializable
+ */
+ private static final long serialVersionUID = 3731842424390998726L;
- /**
- * attribute which closecode will be returned
- */
- private final int closecode;
+ /**
+ * attribute which closecode will be returned
+ */
+ private final int closecode;
- /**
- * constructor for a InvalidDataException
- *
- * @param closecode the closecode which will be returned
- */
- public InvalidDataException(int closecode) {
- this.closecode = closecode;
- }
+ /**
+ * constructor for a InvalidDataException
+ *
+ * @param closecode the closecode which will be returned
+ */
+ public InvalidDataException(int closecode) {
+ this.closecode = closecode;
+ }
- /**
- * constructor for a InvalidDataException.
- *
- * @param closecode the closecode which will be returned.
- * @param s the detail message.
- */
- public InvalidDataException(int closecode, String s) {
- super(s);
- this.closecode = closecode;
- }
+ /**
+ * constructor for a InvalidDataException.
+ *
+ * @param closecode the closecode which will be returned.
+ * @param s the detail message.
+ */
+ public InvalidDataException(int closecode, String s) {
+ super(s);
+ this.closecode = closecode;
+ }
- /**
- * constructor for a InvalidDataException.
- *
- * @param closecode the closecode which will be returned.
- * @param t the throwable causing this exception.
- */
- public InvalidDataException(int closecode, Throwable t) {
- super(t);
- this.closecode = closecode;
- }
+ /**
+ * constructor for a InvalidDataException.
+ *
+ * @param closecode the closecode which will be returned.
+ * @param t the throwable causing this exception.
+ */
+ public InvalidDataException(int closecode, Throwable t) {
+ super(t);
+ this.closecode = closecode;
+ }
- /**
- * constructor for a InvalidDataException.
- *
- * @param closecode the closecode which will be returned.
- * @param s the detail message.
- * @param t the throwable causing this exception.
- */
- public InvalidDataException(int closecode, String s, Throwable t) {
- super(s, t);
- this.closecode = closecode;
- }
+ /**
+ * constructor for a InvalidDataException.
+ *
+ * @param closecode the closecode which will be returned.
+ * @param s the detail message.
+ * @param t the throwable causing this exception.
+ */
+ public InvalidDataException(int closecode, String s, Throwable t) {
+ super(s, t);
+ this.closecode = closecode;
+ }
- /**
- * Getter closecode
- *
- * @return the closecode
- */
- public int getCloseCode() {
- return closecode;
- }
+ /**
+ * Getter closecode
+ *
+ * @return the closecode
+ */
+ public int getCloseCode() {
+ return closecode;
+ }
}
diff --git a/src/main/java/org/java_websocket/exceptions/InvalidEncodingException.java b/src/main/java/org/java_websocket/exceptions/InvalidEncodingException.java
index e966d8ec3..8fdbd1a38 100644
--- a/src/main/java/org/java_websocket/exceptions/InvalidEncodingException.java
+++ b/src/main/java/org/java_websocket/exceptions/InvalidEncodingException.java
@@ -9,27 +9,29 @@
*/
public class InvalidEncodingException extends RuntimeException {
- /**
- * attribute for the encoding exception
- */
- private final UnsupportedEncodingException encodingException;
+ /**
+ * attribute for the encoding exception
+ */
+ private final UnsupportedEncodingException encodingException;
- /**
- * constructor for InvalidEncodingException
- *
- * @param encodingException the cause for this exception
- */
- public InvalidEncodingException(UnsupportedEncodingException encodingException) {
- if (encodingException == null)
- throw new IllegalArgumentException();
- this.encodingException = encodingException;
+ /**
+ * constructor for InvalidEncodingException
+ *
+ * @param encodingException the cause for this exception
+ */
+ public InvalidEncodingException(UnsupportedEncodingException encodingException) {
+ if (encodingException == null) {
+ throw new IllegalArgumentException();
}
+ this.encodingException = encodingException;
+ }
- /**
- * Get the exception which includes more information on the unsupported encoding
- * @return an UnsupportedEncodingException
- */
- public UnsupportedEncodingException getEncodingException() {
- return encodingException;
- }
+ /**
+ * Get the exception which includes more information on the unsupported encoding
+ *
+ * @return an UnsupportedEncodingException
+ */
+ public UnsupportedEncodingException getEncodingException() {
+ return encodingException;
+ }
}
diff --git a/src/main/java/org/java_websocket/exceptions/InvalidFrameException.java b/src/main/java/org/java_websocket/exceptions/InvalidFrameException.java
index 9d5ed55c9..7de2034da 100644
--- a/src/main/java/org/java_websocket/exceptions/InvalidFrameException.java
+++ b/src/main/java/org/java_websocket/exceptions/InvalidFrameException.java
@@ -32,51 +32,51 @@
*/
public class InvalidFrameException extends InvalidDataException {
- /**
- * Serializable
- */
- private static final long serialVersionUID = -9016496369828887591L;
+ /**
+ * Serializable
+ */
+ private static final long serialVersionUID = -9016496369828887591L;
- /**
- * constructor for a InvalidFrameException
- *
- * calling InvalidDataException with closecode PROTOCOL_ERROR
- */
- public InvalidFrameException() {
- super( CloseFrame.PROTOCOL_ERROR);
- }
+ /**
+ * constructor for a InvalidFrameException
+ *
+ * calling InvalidDataException with closecode PROTOCOL_ERROR
+ */
+ public InvalidFrameException() {
+ super(CloseFrame.PROTOCOL_ERROR);
+ }
- /**
- * constructor for a InvalidFrameException
- *
- * calling InvalidDataException with closecode PROTOCOL_ERROR
- *
- * @param s the detail message.
- */
- public InvalidFrameException(String s) {
- super( CloseFrame.PROTOCOL_ERROR, s);
- }
+ /**
+ * constructor for a InvalidFrameException
+ *
+ * calling InvalidDataException with closecode PROTOCOL_ERROR
+ *
+ * @param s the detail message.
+ */
+ public InvalidFrameException(String s) {
+ super(CloseFrame.PROTOCOL_ERROR, s);
+ }
- /**
- * constructor for a InvalidFrameException
- *
- * calling InvalidDataException with closecode PROTOCOL_ERROR
- *
- * @param t the throwable causing this exception.
- */
- public InvalidFrameException(Throwable t) {
- super( CloseFrame.PROTOCOL_ERROR, t);
- }
+ /**
+ * constructor for a InvalidFrameException
+ *
+ * calling InvalidDataException with closecode PROTOCOL_ERROR
+ *
+ * @param t the throwable causing this exception.
+ */
+ public InvalidFrameException(Throwable t) {
+ super(CloseFrame.PROTOCOL_ERROR, t);
+ }
- /**
- * constructor for a InvalidFrameException
- *
- * calling InvalidDataException with closecode PROTOCOL_ERROR
- *
- * @param s the detail message.
- * @param t the throwable causing this exception.
- */
- public InvalidFrameException(String s, Throwable t) {
- super( CloseFrame.PROTOCOL_ERROR, s, t);
- }
+ /**
+ * constructor for a InvalidFrameException
+ *
+ * calling InvalidDataException with closecode PROTOCOL_ERROR
+ *
+ * @param s the detail message.
+ * @param t the throwable causing this exception.
+ */
+ public InvalidFrameException(String s, Throwable t) {
+ super(CloseFrame.PROTOCOL_ERROR, s, t);
+ }
}
diff --git a/src/main/java/org/java_websocket/exceptions/InvalidHandshakeException.java b/src/main/java/org/java_websocket/exceptions/InvalidHandshakeException.java
index 12209ec6f..af1fd2157 100644
--- a/src/main/java/org/java_websocket/exceptions/InvalidHandshakeException.java
+++ b/src/main/java/org/java_websocket/exceptions/InvalidHandshakeException.java
@@ -32,52 +32,52 @@
*/
public class InvalidHandshakeException extends InvalidDataException {
- /**
- * Serializable
- */
- private static final long serialVersionUID = -1426533877490484964L;
+ /**
+ * Serializable
+ */
+ private static final long serialVersionUID = -1426533877490484964L;
- /**
- * constructor for a InvalidHandshakeException
- *
- * calling InvalidDataException with closecode PROTOCOL_ERROR
- */
- public InvalidHandshakeException() {
- super( CloseFrame.PROTOCOL_ERROR);
- }
+ /**
+ * constructor for a InvalidHandshakeException
+ *
+ * calling InvalidDataException with closecode PROTOCOL_ERROR
+ */
+ public InvalidHandshakeException() {
+ super(CloseFrame.PROTOCOL_ERROR);
+ }
- /**
- * constructor for a InvalidHandshakeException
- *
- * calling InvalidDataException with closecode PROTOCOL_ERROR
- *
- * @param s the detail message.
- * @param t the throwable causing this exception.
- */
- public InvalidHandshakeException(String s, Throwable t) {
- super( CloseFrame.PROTOCOL_ERROR, s, t);
- }
+ /**
+ * constructor for a InvalidHandshakeException
+ *
+ * calling InvalidDataException with closecode PROTOCOL_ERROR
+ *
+ * @param s the detail message.
+ * @param t the throwable causing this exception.
+ */
+ public InvalidHandshakeException(String s, Throwable t) {
+ super(CloseFrame.PROTOCOL_ERROR, s, t);
+ }
- /**
- * constructor for a InvalidHandshakeException
- *
- * calling InvalidDataException with closecode PROTOCOL_ERROR
- *
- * @param s the detail message.
- */
- public InvalidHandshakeException(String s) {
- super( CloseFrame.PROTOCOL_ERROR, s);
- }
+ /**
+ * constructor for a InvalidHandshakeException
+ *
+ * calling InvalidDataException with closecode PROTOCOL_ERROR
+ *
+ * @param s the detail message.
+ */
+ public InvalidHandshakeException(String s) {
+ super(CloseFrame.PROTOCOL_ERROR, s);
+ }
- /**
- * constructor for a InvalidHandshakeException
- *
- * calling InvalidDataException with closecode PROTOCOL_ERROR
- *
- * @param t the throwable causing this exception.
- */
- public InvalidHandshakeException(Throwable t) {
- super( CloseFrame.PROTOCOL_ERROR, t);
- }
+ /**
+ * constructor for a InvalidHandshakeException
+ *
+ * calling InvalidDataException with closecode PROTOCOL_ERROR
+ *
+ * @param t the throwable causing this exception.
+ */
+ public InvalidHandshakeException(Throwable t) {
+ super(CloseFrame.PROTOCOL_ERROR, t);
+ }
}
diff --git a/src/main/java/org/java_websocket/exceptions/LimitExceededException.java b/src/main/java/org/java_websocket/exceptions/LimitExceededException.java
index 9642a77d3..9f76d442f 100644
--- a/src/main/java/org/java_websocket/exceptions/LimitExceededException.java
+++ b/src/main/java/org/java_websocket/exceptions/LimitExceededException.java
@@ -32,61 +32,62 @@
*/
public class LimitExceededException extends InvalidDataException {
- /**
- * Serializable
- */
- private static final long serialVersionUID = 6908339749836826785L;
+ /**
+ * Serializable
+ */
+ private static final long serialVersionUID = 6908339749836826785L;
- /**
- * A closer indication about the limit
- */
- private final int limit;
+ /**
+ * A closer indication about the limit
+ */
+ private final int limit;
- /**
- * constructor for a LimitExceededException
- *
- * calling LimitExceededException with closecode TOOBIG
- */
- public LimitExceededException() {
- this(Integer.MAX_VALUE);
- }
+ /**
+ * constructor for a LimitExceededException
+ *
+ * calling LimitExceededException with closecode TOOBIG
+ */
+ public LimitExceededException() {
+ this(Integer.MAX_VALUE);
+ }
- /**
- * constructor for a LimitExceededException
- *
- * calling InvalidDataException with closecode TOOBIG
- */
- public LimitExceededException(int limit) {
- super( CloseFrame.TOOBIG);
- this.limit = limit;
- }
+ /**
+ * constructor for a LimitExceededException
+ *
+ * calling InvalidDataException with closecode TOOBIG
+ */
+ public LimitExceededException(int limit) {
+ super(CloseFrame.TOOBIG);
+ this.limit = limit;
+ }
- /**
- * constructor for a LimitExceededException
- *
- * calling InvalidDataException with closecode TOOBIG
- */
- public LimitExceededException(String s, int limit) {
- super( CloseFrame.TOOBIG, s);
- this.limit = limit;
- }
+ /**
+ * constructor for a LimitExceededException
+ *
+ * calling InvalidDataException with closecode TOOBIG
+ */
+ public LimitExceededException(String s, int limit) {
+ super(CloseFrame.TOOBIG, s);
+ this.limit = limit;
+ }
- /**
- * constructor for a LimitExceededException
- *
- * calling InvalidDataException with closecode TOOBIG
- *
- * @param s the detail message.
- */
- public LimitExceededException(String s) {
- this(s, Integer.MAX_VALUE);
- }
+ /**
+ * constructor for a LimitExceededException
+ *
+ * calling InvalidDataException with closecode TOOBIG
+ *
+ * @param s the detail message.
+ */
+ public LimitExceededException(String s) {
+ this(s, Integer.MAX_VALUE);
+ }
- /**
- * Get the limit which was hit so this exception was caused
- * @return the limit as int
- */
- public int getLimit() {
- return limit;
- }
+ /**
+ * Get the limit which was hit so this exception was caused
+ *
+ * @return the limit as int
+ */
+ public int getLimit() {
+ return limit;
+ }
}
diff --git a/src/main/java/org/java_websocket/exceptions/NotSendableException.java b/src/main/java/org/java_websocket/exceptions/NotSendableException.java
index 4ec9a1a64..fbacca9c7 100644
--- a/src/main/java/org/java_websocket/exceptions/NotSendableException.java
+++ b/src/main/java/org/java_websocket/exceptions/NotSendableException.java
@@ -30,37 +30,37 @@
*/
public class NotSendableException extends RuntimeException {
- /**
- * Serializable
- */
- private static final long serialVersionUID = -6468967874576651628L;
+ /**
+ * Serializable
+ */
+ private static final long serialVersionUID = -6468967874576651628L;
- /**
- * constructor for a NotSendableException
- *
- * @param s the detail message.
- */
- public NotSendableException(String s) {
- super(s);
- }
+ /**
+ * constructor for a NotSendableException
+ *
+ * @param s the detail message.
+ */
+ public NotSendableException(String s) {
+ super(s);
+ }
- /**
- * constructor for a NotSendableException
- *
- * @param t the throwable causing this exception.
- */
- public NotSendableException(Throwable t) {
- super(t);
- }
+ /**
+ * constructor for a NotSendableException
+ *
+ * @param t the throwable causing this exception.
+ */
+ public NotSendableException(Throwable t) {
+ super(t);
+ }
- /**
- * constructor for a NotSendableException
- *
- * @param s the detail message.
- * @param t the throwable causing this exception.
- */
- public NotSendableException(String s, Throwable t) {
- super(s, t);
- }
+ /**
+ * constructor for a NotSendableException
+ *
+ * @param s the detail message.
+ * @param t the throwable causing this exception.
+ */
+ public NotSendableException(String s, Throwable t) {
+ super(s, t);
+ }
}
diff --git a/src/main/java/org/java_websocket/exceptions/WebsocketNotConnectedException.java b/src/main/java/org/java_websocket/exceptions/WebsocketNotConnectedException.java
index 3818af06a..082f0bd5f 100644
--- a/src/main/java/org/java_websocket/exceptions/WebsocketNotConnectedException.java
+++ b/src/main/java/org/java_websocket/exceptions/WebsocketNotConnectedException.java
@@ -30,8 +30,8 @@
*/
public class WebsocketNotConnectedException extends RuntimeException {
- /**
- * Serializable
- */
- private static final long serialVersionUID = -785314021592982715L;
+ /**
+ * Serializable
+ */
+ private static final long serialVersionUID = -785314021592982715L;
}
diff --git a/src/main/java/org/java_websocket/exceptions/WrappedIOException.java b/src/main/java/org/java_websocket/exceptions/WrappedIOException.java
index 4603ad85a..f8f1b1a1c 100644
--- a/src/main/java/org/java_websocket/exceptions/WrappedIOException.java
+++ b/src/main/java/org/java_websocket/exceptions/WrappedIOException.java
@@ -31,44 +31,49 @@
import java.io.IOException;
/**
- * Exception to wrap an IOException and include information about the websocket which had the exception
+ * Exception to wrap an IOException and include information about the websocket which had the
+ * exception
+ *
* @since 1.4.1
*/
public class WrappedIOException extends Exception {
- /**
- * The websocket where the IOException happened
- */
- private final WebSocket connection;
+ /**
+ * The websocket where the IOException happened
+ */
+ private final WebSocket connection;
- /**
- * The IOException
- */
- private final IOException ioException;
+ /**
+ * The IOException
+ */
+ private final IOException ioException;
- /**
- * Wrapp an IOException and include the websocket
- * @param connection the websocket where the IOException happened
- * @param ioException the IOException
- */
- public WrappedIOException(WebSocket connection, IOException ioException) {
- this.connection = connection;
- this.ioException = ioException;
- }
+ /**
+ * Wrapp an IOException and include the websocket
+ *
+ * @param connection the websocket where the IOException happened
+ * @param ioException the IOException
+ */
+ public WrappedIOException(WebSocket connection, IOException ioException) {
+ this.connection = connection;
+ this.ioException = ioException;
+ }
- /**
- * The websocket where the IOException happened
- * @return the websocket for the wrapped IOException
- */
- public WebSocket getConnection() {
- return connection;
- }
+ /**
+ * The websocket where the IOException happened
+ *
+ * @return the websocket for the wrapped IOException
+ */
+ public WebSocket getConnection() {
+ return connection;
+ }
- /**
- * The wrapped IOException
- * @return IOException which is wrapped
- */
- public IOException getIOException() {
- return ioException;
- }
+ /**
+ * The wrapped IOException
+ *
+ * @return IOException which is wrapped
+ */
+ public IOException getIOException() {
+ return ioException;
+ }
}
diff --git a/src/main/java/org/java_websocket/exceptions/package-info.java b/src/main/java/org/java_websocket/exceptions/package-info.java
index 2b5d13621..2972d3c8a 100644
--- a/src/main/java/org/java_websocket/exceptions/package-info.java
+++ b/src/main/java/org/java_websocket/exceptions/package-info.java
@@ -24,6 +24,7 @@
*/
/**
- * This package encapsulates all implementations in relation with the exceptions thrown in this lib.
+ * This package encapsulates all implementations in relation with the exceptions thrown in this
+ * lib.
*/
package org.java_websocket.exceptions;
\ No newline at end of file
diff --git a/src/main/java/org/java_websocket/extensions/CompressionExtension.java b/src/main/java/org/java_websocket/extensions/CompressionExtension.java
index 703a7d0cf..408a1588a 100644
--- a/src/main/java/org/java_websocket/extensions/CompressionExtension.java
+++ b/src/main/java/org/java_websocket/extensions/CompressionExtension.java
@@ -33,17 +33,23 @@
/**
* Implementation for a compression extension specified by https://tools.ietf.org/html/rfc7692
+ *
* @since 1.3.5
*/
public abstract class CompressionExtension extends DefaultExtension {
- @Override
- public void isFrameValid( Framedata inputFrame ) throws InvalidDataException {
- if(( inputFrame instanceof DataFrame ) && ( inputFrame.isRSV2() || inputFrame.isRSV3() )) {
- throw new InvalidFrameException( "bad rsv RSV1: " + inputFrame.isRSV1() + " RSV2: " + inputFrame.isRSV2() + " RSV3: " + inputFrame.isRSV3() );
- }
- if(( inputFrame instanceof ControlFrame ) && ( inputFrame.isRSV1() || inputFrame.isRSV2() || inputFrame.isRSV3() )) {
- throw new InvalidFrameException( "bad rsv RSV1: " + inputFrame.isRSV1() + " RSV2: " + inputFrame.isRSV2() + " RSV3: " + inputFrame.isRSV3() );
- }
- }
+ @Override
+ public void isFrameValid(Framedata inputFrame) throws InvalidDataException {
+ if ((inputFrame instanceof DataFrame) && (inputFrame.isRSV2() || inputFrame.isRSV3())) {
+ throw new InvalidFrameException(
+ "bad rsv RSV1: " + inputFrame.isRSV1() + " RSV2: " + inputFrame.isRSV2() + " RSV3: "
+ + inputFrame.isRSV3());
+ }
+ if ((inputFrame instanceof ControlFrame) && (inputFrame.isRSV1() || inputFrame.isRSV2()
+ || inputFrame.isRSV3())) {
+ throw new InvalidFrameException(
+ "bad rsv RSV1: " + inputFrame.isRSV1() + " RSV2: " + inputFrame.isRSV2() + " RSV3: "
+ + inputFrame.isRSV3());
+ }
+ }
}
diff --git a/src/main/java/org/java_websocket/extensions/DefaultExtension.java b/src/main/java/org/java_websocket/extensions/DefaultExtension.java
index 4bad78b45..3892990c1 100644
--- a/src/main/java/org/java_websocket/extensions/DefaultExtension.java
+++ b/src/main/java/org/java_websocket/extensions/DefaultExtension.java
@@ -31,71 +31,73 @@
/**
* Class which represents the normal websocket implementation specified by rfc6455.
- *
+ *
* This is a fallback and will always be available for a Draft_6455
*
* @since 1.3.5
*/
public class DefaultExtension implements IExtension {
- @Override
- public void decodeFrame( Framedata inputFrame ) throws InvalidDataException {
- //Nothing to do here
- }
+ @Override
+ public void decodeFrame(Framedata inputFrame) throws InvalidDataException {
+ //Nothing to do here
+ }
- @Override
- public void encodeFrame( Framedata inputFrame ) {
- //Nothing to do here
- }
+ @Override
+ public void encodeFrame(Framedata inputFrame) {
+ //Nothing to do here
+ }
- @Override
- public boolean acceptProvidedExtensionAsServer( String inputExtension ) {
- return true;
- }
+ @Override
+ public boolean acceptProvidedExtensionAsServer(String inputExtension) {
+ return true;
+ }
- @Override
- public boolean acceptProvidedExtensionAsClient( String inputExtension ) {
- return true;
- }
+ @Override
+ public boolean acceptProvidedExtensionAsClient(String inputExtension) {
+ return true;
+ }
- @Override
- public void isFrameValid( Framedata inputFrame ) throws InvalidDataException {
- if( inputFrame.isRSV1() || inputFrame.isRSV2() || inputFrame.isRSV3() ) {
- throw new InvalidFrameException( "bad rsv RSV1: " + inputFrame.isRSV1() + " RSV2: " + inputFrame.isRSV2() + " RSV3: " + inputFrame.isRSV3() );
- }
- }
+ @Override
+ public void isFrameValid(Framedata inputFrame) throws InvalidDataException {
+ if (inputFrame.isRSV1() || inputFrame.isRSV2() || inputFrame.isRSV3()) {
+ throw new InvalidFrameException(
+ "bad rsv RSV1: " + inputFrame.isRSV1() + " RSV2: " + inputFrame.isRSV2() + " RSV3: "
+ + inputFrame.isRSV3());
+ }
+ }
- @Override
- public String getProvidedExtensionAsClient() {
- return "";
- }
+ @Override
+ public String getProvidedExtensionAsClient() {
+ return "";
+ }
- @Override
- public String getProvidedExtensionAsServer() {
- return "";
- }
+ @Override
+ public String getProvidedExtensionAsServer() {
+ return "";
+ }
- @Override
- public IExtension copyInstance() {
- return new DefaultExtension();
- }
+ @Override
+ public IExtension copyInstance() {
+ return new DefaultExtension();
+ }
- public void reset() {
- //Nothing to do here. No internal stats.
- }
+ public void reset() {
+ //Nothing to do here. No internal stats.
+ }
- @Override
- public String toString() {
- return getClass().getSimpleName();
- }
+ @Override
+ public String toString() {
+ return getClass().getSimpleName();
+ }
- @Override
- public int hashCode() {
- return getClass().hashCode();
- }
+ @Override
+ public int hashCode() {
+ return getClass().hashCode();
+ }
- @Override
- public boolean equals( Object o ) {
- return this == o || o != null && getClass() == o.getClass();
- }
+ @Override
+ public boolean equals(Object o) {
+ return this == o || o != null && getClass() == o.getClass();
+ }
}
diff --git a/src/main/java/org/java_websocket/extensions/ExtensionRequestData.java b/src/main/java/org/java_websocket/extensions/ExtensionRequestData.java
index 639dd802b..8d46d9566 100644
--- a/src/main/java/org/java_websocket/extensions/ExtensionRequestData.java
+++ b/src/main/java/org/java_websocket/extensions/ExtensionRequestData.java
@@ -5,48 +5,49 @@
public class ExtensionRequestData {
- public static String EMPTY_VALUE = "";
+ public static String EMPTY_VALUE = "";
- private Map
- * Using opcode closing and fin = true
- */
- public CloseFrame() {
- super(Opcode.CLOSING);
- setReason("");
- setCode(CloseFrame.NORMAL);
+ /**
+ * Constructor for a close frame
+ *
+ * Using opcode closing and fin = true
+ */
+ public CloseFrame() {
+ super(Opcode.CLOSING);
+ setReason("");
+ setCode(CloseFrame.NORMAL);
+ }
+
+ /**
+ * Set the close code for this close frame
+ *
+ * @param code the close code
+ */
+ public void setCode(int code) {
+ this.code = code;
+ // CloseFrame.TLS_ERROR is not allowed to be transferred over the wire
+ if (code == CloseFrame.TLS_ERROR) {
+ this.code = CloseFrame.NOCODE;
+ this.reason = "";
}
+ updatePayload();
+ }
- /**
- * Set the close code for this close frame
- * @param code the close code
- */
- public void setCode(int code) {
- this.code = code;
- // CloseFrame.TLS_ERROR is not allowed to be transferred over the wire
- if (code == CloseFrame.TLS_ERROR) {
- this.code = CloseFrame.NOCODE;
- this.reason = "";
- }
- updatePayload();
+ /**
+ * Set the close reason for this close frame
+ *
+ * @param reason the reason code
+ */
+ public void setReason(String reason) {
+ if (reason == null) {
+ reason = "";
}
+ this.reason = reason;
+ updatePayload();
+ }
+
+ /**
+ * Get the used close code
+ *
+ * @return the used close code
+ */
+ public int getCloseCode() {
+ return code;
+ }
+
+ /**
+ * Get the message that closeframe is containing
+ *
+ * @return the message in this frame
+ */
+ public String getMessage() {
+ return reason;
+ }
- /**
- * Set the close reason for this close frame
- * @param reason the reason code
- */
- public void setReason(String reason) {
- if (reason == null) {
- reason = "";
- }
- this.reason = reason;
- updatePayload();
+ @Override
+ public String toString() {
+ return super.toString() + "code: " + code;
+ }
+
+ @Override
+ public void isValid() throws InvalidDataException {
+ super.isValid();
+ if (code == CloseFrame.NO_UTF8 && reason.isEmpty()) {
+ throw new InvalidDataException(CloseFrame.NO_UTF8, "Received text is no valid utf8 string!");
}
- /**
- * Get the used close code
- *
- * @return the used close code
- */
- public int getCloseCode() {
- return code;
+ if (code == CloseFrame.NOCODE && 0 < reason.length()) {
+ throw new InvalidDataException(PROTOCOL_ERROR,
+ "A close frame must have a closecode if it has a reason");
}
-
- /**
- * Get the message that closeframe is containing
- *
- * @return the message in this frame
- */
- public String getMessage() {
- return reason;
+ //Intentional check for code != CloseFrame.TLS_ERROR just to make sure even if the code earlier changes
+ if ((code > CloseFrame.TLS_ERROR && code < 3000)) {
+ throw new InvalidDataException(PROTOCOL_ERROR, "Trying to send an illegal close code!");
}
+ if (code == CloseFrame.ABNORMAL_CLOSE || code == CloseFrame.TLS_ERROR
+ || code == CloseFrame.NOCODE || code > 4999 || code < 1000 || code == 1004) {
+ throw new InvalidFrameException("closecode must not be sent over the wire: " + code);
+ }
+ }
- @Override
- public String toString() {
- return super.toString() + "code: " + code;
+ @Override
+ public void setPayload(ByteBuffer payload) {
+ code = CloseFrame.NOCODE;
+ reason = "";
+ payload.mark();
+ if (payload.remaining() == 0) {
+ code = CloseFrame.NORMAL;
+ } else if (payload.remaining() == 1) {
+ code = CloseFrame.PROTOCOL_ERROR;
+ } else {
+ if (payload.remaining() >= 2) {
+ ByteBuffer bb = ByteBuffer.allocate(4);
+ bb.position(2);
+ bb.putShort(payload.getShort());
+ bb.position(0);
+ code = bb.getInt();
+ }
+ payload.reset();
+ try {
+ int mark = payload.position();// because stringUtf8 also creates a mark
+ validateUtf8(payload, mark);
+ } catch (InvalidDataException e) {
+ code = CloseFrame.NO_UTF8;
+ reason = null;
+ }
}
+ }
- @Override
- public void isValid() throws InvalidDataException {
- super.isValid();
- if (code == CloseFrame.NO_UTF8 && reason.isEmpty()) {
- throw new InvalidDataException( CloseFrame.NO_UTF8, "Received text is no valid utf8 string!");
- }
- if (code == CloseFrame.NOCODE && 0 < reason.length()) {
- throw new InvalidDataException(PROTOCOL_ERROR, "A close frame must have a closecode if it has a reason");
- }
- //Intentional check for code != CloseFrame.TLS_ERROR just to make sure even if the code earlier changes
- if ((code > CloseFrame.TLS_ERROR && code < 3000)) {
- throw new InvalidDataException(PROTOCOL_ERROR, "Trying to send an illegal close code!");
- }
- if (code == CloseFrame.ABNORMAL_CLOSE || code == CloseFrame.TLS_ERROR || code == CloseFrame.NOCODE || code > 4999 || code < 1000 || code == 1004) {
- throw new InvalidFrameException("closecode must not be sent over the wire: " + code);
- }
+ /**
+ * Validate the payload to valid utf8
+ *
+ * @param mark the current mark
+ * @param payload the current payload
+ * @throws InvalidDataException the current payload is not a valid utf8
+ */
+ private void validateUtf8(ByteBuffer payload, int mark) throws InvalidDataException {
+ try {
+ payload.position(payload.position() + 2);
+ reason = Charsetfunctions.stringUtf8(payload);
+ } catch (IllegalArgumentException e) {
+ throw new InvalidDataException(CloseFrame.NO_UTF8);
+ } finally {
+ payload.position(mark);
}
+ }
- @Override
- public void setPayload(ByteBuffer payload) {
- code = CloseFrame.NOCODE;
- reason = "";
- payload.mark();
- if( payload.remaining() == 0 ) {
- code = CloseFrame.NORMAL;
- } else if( payload.remaining() == 1 ) {
- code = CloseFrame.PROTOCOL_ERROR;
- } else {
- if( payload.remaining() >= 2 ) {
- ByteBuffer bb = ByteBuffer.allocate( 4 );
- bb.position( 2 );
- bb.putShort( payload.getShort() );
- bb.position( 0 );
- code = bb.getInt();
- }
- payload.reset();
- try {
- int mark = payload.position();// because stringUtf8 also creates a mark
- validateUtf8(payload, mark);
- } catch ( InvalidDataException e ) {
- code = CloseFrame.NO_UTF8;
- reason = null;
- }
- }
- }
+ /**
+ * Update the payload to represent the close code and the reason
+ */
+ private void updatePayload() {
+ byte[] by = Charsetfunctions.utf8Bytes(reason);
+ ByteBuffer buf = ByteBuffer.allocate(4);
+ buf.putInt(code);
+ buf.position(2);
+ ByteBuffer pay = ByteBuffer.allocate(2 + by.length);
+ pay.put(buf);
+ pay.put(by);
+ pay.rewind();
+ super.setPayload(pay);
+ }
- /**
- * Validate the payload to valid utf8
- * @param mark the current mark
- * @param payload the current payload
- * @throws InvalidDataException the current payload is not a valid utf8
- */
- private void validateUtf8(ByteBuffer payload, int mark) throws InvalidDataException {
- try {
- payload.position( payload.position() + 2 );
- reason = Charsetfunctions.stringUtf8( payload );
- } catch ( IllegalArgumentException e ) {
- throw new InvalidDataException( CloseFrame.NO_UTF8 );
- } finally {
- payload.position( mark );
- }
+ @Override
+ public ByteBuffer getPayloadData() {
+ if (code == NOCODE) {
+ return ByteBufferUtils.getEmptyByteBuffer();
}
+ return super.getPayloadData();
+ }
- /**
- * Update the payload to represent the close code and the reason
- */
- private void updatePayload() {
- byte[] by = Charsetfunctions.utf8Bytes(reason);
- ByteBuffer buf = ByteBuffer.allocate(4);
- buf.putInt(code);
- buf.position(2);
- ByteBuffer pay = ByteBuffer.allocate(2 + by.length);
- pay.put(buf);
- pay.put(by);
- pay.rewind();
- super.setPayload(pay);
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
}
-
- @Override
- public ByteBuffer getPayloadData() {
- if (code == NOCODE)
- return ByteBufferUtils.getEmptyByteBuffer();
- return super.getPayloadData();
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
}
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- CloseFrame that = (CloseFrame) o;
+ CloseFrame that = (CloseFrame) o;
- if (code != that.code) return false;
- return reason != null ? reason.equals(that.reason) : that.reason == null;
+ if (code != that.code) {
+ return false;
}
+ return reason != null ? reason.equals(that.reason) : that.reason == null;
+ }
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + code;
- result = 31 * result + (reason != null ? reason.hashCode() : 0);
- return result;
- }
+ @Override
+ public int hashCode() {
+ int result = super.hashCode();
+ result = 31 * result + code;
+ result = 31 * result + (reason != null ? reason.hashCode() : 0);
+ return result;
+ }
}
diff --git a/src/main/java/org/java_websocket/framing/ContinuousFrame.java b/src/main/java/org/java_websocket/framing/ContinuousFrame.java
index 7e8738278..c518cc3bd 100644
--- a/src/main/java/org/java_websocket/framing/ContinuousFrame.java
+++ b/src/main/java/org/java_websocket/framing/ContinuousFrame.java
@@ -32,10 +32,10 @@
*/
public class ContinuousFrame extends DataFrame {
- /**
- * constructor which sets the opcode of this frame to continuous
- */
- public ContinuousFrame() {
- super( Opcode.CONTINUOUS );
- }
+ /**
+ * constructor which sets the opcode of this frame to continuous
+ */
+ public ContinuousFrame() {
+ super(Opcode.CONTINUOUS);
+ }
}
diff --git a/src/main/java/org/java_websocket/framing/ControlFrame.java b/src/main/java/org/java_websocket/framing/ControlFrame.java
index e8848ed84..1469dc5e6 100644
--- a/src/main/java/org/java_websocket/framing/ControlFrame.java
+++ b/src/main/java/org/java_websocket/framing/ControlFrame.java
@@ -34,27 +34,28 @@
*/
public abstract class ControlFrame extends FramedataImpl1 {
- /**
- * Class to represent a control frame
- * @param opcode the opcode to use
- */
- public ControlFrame( Opcode opcode ) {
- super( opcode );
- }
+ /**
+ * Class to represent a control frame
+ *
+ * @param opcode the opcode to use
+ */
+ public ControlFrame(Opcode opcode) {
+ super(opcode);
+ }
- @Override
- public void isValid() throws InvalidDataException {
- if( !isFin() ) {
- throw new InvalidFrameException( "Control frame can't have fin==false set" );
- }
- if( isRSV1() ) {
- throw new InvalidFrameException( "Control frame can't have rsv1==true set" );
- }
- if( isRSV2() ) {
- throw new InvalidFrameException( "Control frame can't have rsv2==true set" );
- }
- if( isRSV3() ) {
- throw new InvalidFrameException( "Control frame can't have rsv3==true set" );
- }
- }
+ @Override
+ public void isValid() throws InvalidDataException {
+ if (!isFin()) {
+ throw new InvalidFrameException("Control frame can't have fin==false set");
+ }
+ if (isRSV1()) {
+ throw new InvalidFrameException("Control frame can't have rsv1==true set");
+ }
+ if (isRSV2()) {
+ throw new InvalidFrameException("Control frame can't have rsv2==true set");
+ }
+ if (isRSV3()) {
+ throw new InvalidFrameException("Control frame can't have rsv3==true set");
+ }
+ }
}
diff --git a/src/main/java/org/java_websocket/framing/DataFrame.java b/src/main/java/org/java_websocket/framing/DataFrame.java
index 0a3ada56e..c845c2ced 100644
--- a/src/main/java/org/java_websocket/framing/DataFrame.java
+++ b/src/main/java/org/java_websocket/framing/DataFrame.java
@@ -33,17 +33,17 @@
*/
public abstract class DataFrame extends FramedataImpl1 {
- /**
- * Class to represent a data frame
- * @param opcode the opcode to use
- */
- public DataFrame(Opcode opcode) {
- super(opcode);
- }
+ /**
+ * Class to represent a data frame
+ *
+ * @param opcode the opcode to use
+ */
+ public DataFrame(Opcode opcode) {
+ super(opcode);
+ }
- @Override
- public void isValid() throws InvalidDataException
- {
- //Nothing specific to check
- }
+ @Override
+ public void isValid() throws InvalidDataException {
+ //Nothing specific to check
+ }
}
diff --git a/src/main/java/org/java_websocket/framing/Framedata.java b/src/main/java/org/java_websocket/framing/Framedata.java
index 03074dbdd..11c4e01ce 100644
--- a/src/main/java/org/java_websocket/framing/Framedata.java
+++ b/src/main/java/org/java_websocket/framing/Framedata.java
@@ -33,53 +33,62 @@
*/
public interface Framedata {
- /**
- * Indicates that this is the final fragment in a message. The first fragment MAY also be the final fragment.
- * @return true, if this frame is the final fragment
- */
- boolean isFin();
+ /**
+ * Indicates that this is the final fragment in a message. The first fragment MAY also be the
+ * final fragment.
+ *
+ * @return true, if this frame is the final fragment
+ */
+ boolean isFin();
- /**
- * Indicates that this frame has the rsv1 bit set.
- * @return true, if this frame has the rsv1 bit set
- */
- boolean isRSV1();
+ /**
+ * Indicates that this frame has the rsv1 bit set.
+ *
+ * @return true, if this frame has the rsv1 bit set
+ */
+ boolean isRSV1();
- /**
- * Indicates that this frame has the rsv2 bit set.
- * @return true, if this frame has the rsv2 bit set
- */
- boolean isRSV2();
+ /**
+ * Indicates that this frame has the rsv2 bit set.
+ *
+ * @return true, if this frame has the rsv2 bit set
+ */
+ boolean isRSV2();
- /**
- * Indicates that this frame has the rsv3 bit set.
- * @return true, if this frame has the rsv3 bit set
- */
- boolean isRSV3();
+ /**
+ * Indicates that this frame has the rsv3 bit set.
+ *
+ * @return true, if this frame has the rsv3 bit set
+ */
+ boolean isRSV3();
- /**
- * Defines whether the "Payload data" is masked.
- * @return true, "Payload data" is masked
- */
- boolean getTransfereMasked();
+ /**
+ * Defines whether the "Payload data" is masked.
+ *
+ * @return true, "Payload data" is masked
+ */
+ boolean getTransfereMasked();
- /**
- * Defines the interpretation of the "Payload data".
- * @return the interpretation as a Opcode
- */
- Opcode getOpcode();
+ /**
+ * Defines the interpretation of the "Payload data".
+ *
+ * @return the interpretation as a Opcode
+ */
+ Opcode getOpcode();
- /**
- * The "Payload data" which was sent in this frame
- * @return the "Payload data" as ByteBuffer
- */
- ByteBuffer getPayloadData();// TODO the separation of the application data and the extension data is yet to be done
+ /**
+ * The "Payload data" which was sent in this frame
+ *
+ * @return the "Payload data" as ByteBuffer
+ */
+ ByteBuffer getPayloadData();// TODO the separation of the application data and the extension data is yet to be done
- /**
- * Appends an additional frame to the current frame
- *
- * This methods does not override the opcode, but does override the fin
- * @param nextframe the additional frame
- */
- void append( Framedata nextframe );
+ /**
+ * Appends an additional frame to the current frame
+ *
+ * This methods does not override the opcode, but does override the fin
+ *
+ * @param nextframe the additional frame
+ */
+ void append(Framedata nextframe);
}
diff --git a/src/main/java/org/java_websocket/framing/FramedataImpl1.java b/src/main/java/org/java_websocket/framing/FramedataImpl1.java
index f3e3f97e1..5dc30cf8a 100644
--- a/src/main/java/org/java_websocket/framing/FramedataImpl1.java
+++ b/src/main/java/org/java_websocket/framing/FramedataImpl1.java
@@ -36,239 +36,260 @@
*/
public abstract class FramedataImpl1 implements Framedata {
- /**
- * Indicates that this is the final fragment in a message.
- */
- private boolean fin;
- /**
- * Defines the interpretation of the "Payload data".
- */
- private Opcode optcode;
-
- /**
- * The unmasked "Payload data" which was sent in this frame
- */
- private ByteBuffer unmaskedpayload;
-
- /**
- * Defines whether the "Payload data" is masked.
- */
- private boolean transferemasked;
-
- /**
- * Indicates that the rsv1 bit is set or not
- */
- private boolean rsv1;
-
- /**
- * Indicates that the rsv2 bit is set or not
- */
- private boolean rsv2;
-
- /**
- * Indicates that the rsv3 bit is set or not
- */
- private boolean rsv3;
-
- /**
- * Check if the frame is valid due to specification
- *
- * @throws InvalidDataException thrown if the frame is not a valid frame
- */
- public abstract void isValid() throws InvalidDataException;
-
- /**
- * Constructor for a FramedataImpl without any attributes set apart from the opcode
- *
- * @param op the opcode to use
- */
- public FramedataImpl1(Opcode op) {
- optcode = op;
- unmaskedpayload = ByteBufferUtils.getEmptyByteBuffer();
- fin = true;
- transferemasked = false;
- rsv1 = false;
- rsv2 = false;
- rsv3 = false;
+ /**
+ * Indicates that this is the final fragment in a message.
+ */
+ private boolean fin;
+ /**
+ * Defines the interpretation of the "Payload data".
+ */
+ private Opcode optcode;
+
+ /**
+ * The unmasked "Payload data" which was sent in this frame
+ */
+ private ByteBuffer unmaskedpayload;
+
+ /**
+ * Defines whether the "Payload data" is masked.
+ */
+ private boolean transferemasked;
+
+ /**
+ * Indicates that the rsv1 bit is set or not
+ */
+ private boolean rsv1;
+
+ /**
+ * Indicates that the rsv2 bit is set or not
+ */
+ private boolean rsv2;
+
+ /**
+ * Indicates that the rsv3 bit is set or not
+ */
+ private boolean rsv3;
+
+ /**
+ * Check if the frame is valid due to specification
+ *
+ * @throws InvalidDataException thrown if the frame is not a valid frame
+ */
+ public abstract void isValid() throws InvalidDataException;
+
+ /**
+ * Constructor for a FramedataImpl without any attributes set apart from the opcode
+ *
+ * @param op the opcode to use
+ */
+ public FramedataImpl1(Opcode op) {
+ optcode = op;
+ unmaskedpayload = ByteBufferUtils.getEmptyByteBuffer();
+ fin = true;
+ transferemasked = false;
+ rsv1 = false;
+ rsv2 = false;
+ rsv3 = false;
+ }
+
+ @Override
+ public boolean isRSV1() {
+ return rsv1;
+ }
+
+ @Override
+ public boolean isRSV2() {
+ return rsv2;
+ }
+
+ @Override
+ public boolean isRSV3() {
+ return rsv3;
+ }
+
+ @Override
+ public boolean isFin() {
+ return fin;
+ }
+
+ @Override
+ public Opcode getOpcode() {
+ return optcode;
+ }
+
+ @Override
+ public boolean getTransfereMasked() {
+ return transferemasked;
+ }
+
+ @Override
+ public ByteBuffer getPayloadData() {
+ return unmaskedpayload;
+ }
+
+ @Override
+ public void append(Framedata nextframe) {
+ ByteBuffer b = nextframe.getPayloadData();
+ if (unmaskedpayload == null) {
+ unmaskedpayload = ByteBuffer.allocate(b.remaining());
+ b.mark();
+ unmaskedpayload.put(b);
+ b.reset();
+ } else {
+ b.mark();
+ unmaskedpayload.position(unmaskedpayload.limit());
+ unmaskedpayload.limit(unmaskedpayload.capacity());
+
+ if (b.remaining() > unmaskedpayload.remaining()) {
+ ByteBuffer tmp = ByteBuffer.allocate(b.remaining() + unmaskedpayload.capacity());
+ unmaskedpayload.flip();
+ tmp.put(unmaskedpayload);
+ tmp.put(b);
+ unmaskedpayload = tmp;
+
+ } else {
+ unmaskedpayload.put(b);
+ }
+ unmaskedpayload.rewind();
+ b.reset();
}
-
- @Override
- public boolean isRSV1() {
- return rsv1;
- }
-
- @Override
- public boolean isRSV2() {
- return rsv2;
- }
-
- @Override
- public boolean isRSV3() {
- return rsv3;
- }
-
- @Override
- public boolean isFin() {
- return fin;
- }
-
- @Override
- public Opcode getOpcode() {
- return optcode;
- }
-
- @Override
- public boolean getTransfereMasked() {
- return transferemasked;
- }
-
- @Override
- public ByteBuffer getPayloadData() {
- return unmaskedpayload;
+ fin = nextframe.isFin();
+
+ }
+
+ @Override
+ public String toString() {
+ return "Framedata{ opcode:" + getOpcode() + ", fin:" + isFin() + ", rsv1:" + isRSV1()
+ + ", rsv2:" + isRSV2() + ", rsv3:" + isRSV3() + ", payload length:[pos:" + unmaskedpayload
+ .position() + ", len:" + unmaskedpayload.remaining() + "], payload:" + (
+ unmaskedpayload.remaining() > 1000 ? "(too big to display)"
+ : new String(unmaskedpayload.array())) + '}';
+ }
+
+ /**
+ * Set the payload of this frame to the provided payload
+ *
+ * @param payload the payload which is to set
+ */
+ public void setPayload(ByteBuffer payload) {
+ this.unmaskedpayload = payload;
+ }
+
+ /**
+ * Set the fin of this frame to the provided boolean
+ *
+ * @param fin true if fin has to be set
+ */
+ public void setFin(boolean fin) {
+ this.fin = fin;
+ }
+
+ /**
+ * Set the rsv1 of this frame to the provided boolean
+ *
+ * @param rsv1 true if rsv1 has to be set
+ */
+ public void setRSV1(boolean rsv1) {
+ this.rsv1 = rsv1;
+ }
+
+ /**
+ * Set the rsv2 of this frame to the provided boolean
+ *
+ * @param rsv2 true if rsv2 has to be set
+ */
+ public void setRSV2(boolean rsv2) {
+ this.rsv2 = rsv2;
+ }
+
+ /**
+ * Set the rsv3 of this frame to the provided boolean
+ *
+ * @param rsv3 true if rsv3 has to be set
+ */
+ public void setRSV3(boolean rsv3) {
+ this.rsv3 = rsv3;
+ }
+
+ /**
+ * Set the tranferemask of this frame to the provided boolean
+ *
+ * @param transferemasked true if transferemasked has to be set
+ */
+ public void setTransferemasked(boolean transferemasked) {
+ this.transferemasked = transferemasked;
+ }
+
+ /**
+ * Get a frame with a specific opcode
+ *
+ * @param opcode the opcode representing the frame
+ * @return the frame with a specific opcode
+ */
+ public static FramedataImpl1 get(Opcode opcode) {
+ if (opcode == null) {
+ throw new IllegalArgumentException("Supplied opcode cannot be null");
}
-
- @Override
- public void append(Framedata nextframe) {
- ByteBuffer b = nextframe.getPayloadData();
- if (unmaskedpayload == null) {
- unmaskedpayload = ByteBuffer.allocate(b.remaining());
- b.mark();
- unmaskedpayload.put(b);
- b.reset();
- } else {
- b.mark();
- unmaskedpayload.position(unmaskedpayload.limit());
- unmaskedpayload.limit(unmaskedpayload.capacity());
-
- if (b.remaining() > unmaskedpayload.remaining()) {
- ByteBuffer tmp = ByteBuffer.allocate(b.remaining() + unmaskedpayload.capacity());
- unmaskedpayload.flip();
- tmp.put(unmaskedpayload);
- tmp.put(b);
- unmaskedpayload = tmp;
-
- } else {
- unmaskedpayload.put(b);
- }
- unmaskedpayload.rewind();
- b.reset();
- }
- fin = nextframe.isFin();
-
+ switch (opcode) {
+ case PING:
+ return new PingFrame();
+ case PONG:
+ return new PongFrame();
+ case TEXT:
+ return new TextFrame();
+ case BINARY:
+ return new BinaryFrame();
+ case CLOSING:
+ return new CloseFrame();
+ case CONTINUOUS:
+ return new ContinuousFrame();
+ default:
+ throw new IllegalArgumentException("Supplied opcode is invalid");
}
+ }
- @Override
- public String toString() {
- return "Framedata{ opcode:" + getOpcode() + ", fin:" + isFin() + ", rsv1:" + isRSV1() + ", rsv2:" + isRSV2() + ", rsv3:" + isRSV3() + ", payload length:[pos:" + unmaskedpayload.position() + ", len:" + unmaskedpayload.remaining() + "], payload:" + ( unmaskedpayload.remaining() > 1000 ? "(too big to display)" : new String( unmaskedpayload.array() ) ) + '}';
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
}
-
- /**
- * Set the payload of this frame to the provided payload
- *
- * @param payload the payload which is to set
- */
- public void setPayload(ByteBuffer payload) {
- this.unmaskedpayload = payload;
+ if (o == null || getClass() != o.getClass()) {
+ return false;
}
- /**
- * Set the fin of this frame to the provided boolean
- *
- * @param fin true if fin has to be set
- */
- public void setFin(boolean fin) {
- this.fin = fin;
- }
+ FramedataImpl1 that = (FramedataImpl1) o;
- /**
- * Set the rsv1 of this frame to the provided boolean
- *
- * @param rsv1 true if rsv1 has to be set
- */
- public void setRSV1(boolean rsv1) {
- this.rsv1 = rsv1;
+ if (fin != that.fin) {
+ return false;
}
-
- /**
- * Set the rsv2 of this frame to the provided boolean
- *
- * @param rsv2 true if rsv2 has to be set
- */
- public void setRSV2(boolean rsv2) {
- this.rsv2 = rsv2;
+ if (transferemasked != that.transferemasked) {
+ return false;
}
-
- /**
- * Set the rsv3 of this frame to the provided boolean
- *
- * @param rsv3 true if rsv3 has to be set
- */
- public void setRSV3(boolean rsv3) {
- this.rsv3 = rsv3;
+ if (rsv1 != that.rsv1) {
+ return false;
}
-
- /**
- * Set the tranferemask of this frame to the provided boolean
- *
- * @param transferemasked true if transferemasked has to be set
- */
- public void setTransferemasked(boolean transferemasked) {
- this.transferemasked = transferemasked;
+ if (rsv2 != that.rsv2) {
+ return false;
}
-
- /**
- * Get a frame with a specific opcode
- *
- * @param opcode the opcode representing the frame
- * @return the frame with a specific opcode
- */
- public static FramedataImpl1 get(Opcode opcode) {
- if (opcode== null) {
- throw new IllegalArgumentException("Supplied opcode cannot be null");
- }
- switch (opcode) {
- case PING:
- return new PingFrame();
- case PONG:
- return new PongFrame();
- case TEXT:
- return new TextFrame();
- case BINARY:
- return new BinaryFrame();
- case CLOSING:
- return new CloseFrame();
- case CONTINUOUS:
- return new ContinuousFrame();
- default:
- throw new IllegalArgumentException("Supplied opcode is invalid");
- }
- }
-
- @Override
- public boolean equals( Object o ) {
- if( this == o ) return true;
- if( o == null || getClass() != o.getClass() ) return false;
-
- FramedataImpl1 that = ( FramedataImpl1 ) o;
-
- if( fin != that.fin ) return false;
- if( transferemasked != that.transferemasked ) return false;
- if( rsv1 != that.rsv1 ) return false;
- if( rsv2 != that.rsv2 ) return false;
- if( rsv3 != that.rsv3 ) return false;
- if( optcode != that.optcode ) return false;
- return unmaskedpayload != null ? unmaskedpayload.equals( that.unmaskedpayload ) : that.unmaskedpayload == null;
+ if (rsv3 != that.rsv3) {
+ return false;
}
-
- @Override
- public int hashCode() {
- int result = ( fin ? 1 : 0 );
- result = 31 * result + optcode.hashCode();
- result = 31 * result + ( unmaskedpayload != null ? unmaskedpayload.hashCode() : 0 );
- result = 31 * result + ( transferemasked ? 1 : 0 );
- result = 31 * result + ( rsv1 ? 1 : 0 );
- result = 31 * result + ( rsv2 ? 1 : 0 );
- result = 31 * result + ( rsv3 ? 1 : 0 );
- return result;
+ if (optcode != that.optcode) {
+ return false;
}
+ return unmaskedpayload != null ? unmaskedpayload.equals(that.unmaskedpayload)
+ : that.unmaskedpayload == null;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = (fin ? 1 : 0);
+ result = 31 * result + optcode.hashCode();
+ result = 31 * result + (unmaskedpayload != null ? unmaskedpayload.hashCode() : 0);
+ result = 31 * result + (transferemasked ? 1 : 0);
+ result = 31 * result + (rsv1 ? 1 : 0);
+ result = 31 * result + (rsv2 ? 1 : 0);
+ result = 31 * result + (rsv3 ? 1 : 0);
+ return result;
+ }
}
diff --git a/src/main/java/org/java_websocket/framing/PingFrame.java b/src/main/java/org/java_websocket/framing/PingFrame.java
index fc60b9390..ae2b29119 100644
--- a/src/main/java/org/java_websocket/framing/PingFrame.java
+++ b/src/main/java/org/java_websocket/framing/PingFrame.java
@@ -32,10 +32,10 @@
*/
public class PingFrame extends ControlFrame {
- /**
- * constructor which sets the opcode of this frame to ping
- */
- public PingFrame() {
- super(Opcode.PING);
- }
+ /**
+ * constructor which sets the opcode of this frame to ping
+ */
+ public PingFrame() {
+ super(Opcode.PING);
+ }
}
diff --git a/src/main/java/org/java_websocket/framing/PongFrame.java b/src/main/java/org/java_websocket/framing/PongFrame.java
index 31f5eb397..4b58139ea 100644
--- a/src/main/java/org/java_websocket/framing/PongFrame.java
+++ b/src/main/java/org/java_websocket/framing/PongFrame.java
@@ -32,20 +32,20 @@
*/
public class PongFrame extends ControlFrame {
- /**
- * constructor which sets the opcode of this frame to pong
- */
- public PongFrame() {
- super(Opcode.PONG);
- }
+ /**
+ * constructor which sets the opcode of this frame to pong
+ */
+ public PongFrame() {
+ super(Opcode.PONG);
+ }
- /**
- * constructor which sets the opcode of this frame to ping copying over the payload of the ping
- *
- * @param pingFrame the PingFrame which payload is to copy
- */
- public PongFrame(PingFrame pingFrame) {
- super(Opcode.PONG);
- setPayload(pingFrame.getPayloadData());
- }
+ /**
+ * constructor which sets the opcode of this frame to ping copying over the payload of the ping
+ *
+ * @param pingFrame the PingFrame which payload is to copy
+ */
+ public PongFrame(PingFrame pingFrame) {
+ super(Opcode.PONG);
+ setPayload(pingFrame.getPayloadData());
+ }
}
diff --git a/src/main/java/org/java_websocket/framing/TextFrame.java b/src/main/java/org/java_websocket/framing/TextFrame.java
index 8dc77f181..52154b47e 100644
--- a/src/main/java/org/java_websocket/framing/TextFrame.java
+++ b/src/main/java/org/java_websocket/framing/TextFrame.java
@@ -34,18 +34,18 @@
*/
public class TextFrame extends DataFrame {
- /**
- * constructor which sets the opcode of this frame to text
- */
- public TextFrame() {
- super(Opcode.TEXT);
- }
+ /**
+ * constructor which sets the opcode of this frame to text
+ */
+ public TextFrame() {
+ super(Opcode.TEXT);
+ }
- @Override
- public void isValid() throws InvalidDataException {
- super.isValid();
- if (!Charsetfunctions.isValidUTF8( getPayloadData() )) {
- throw new InvalidDataException(CloseFrame.NO_UTF8, "Received text is no valid utf8 string!");
- }
+ @Override
+ public void isValid() throws InvalidDataException {
+ super.isValid();
+ if (!Charsetfunctions.isValidUTF8(getPayloadData())) {
+ throw new InvalidDataException(CloseFrame.NO_UTF8, "Received text is no valid utf8 string!");
}
+ }
}
diff --git a/src/main/java/org/java_websocket/framing/package-info.java b/src/main/java/org/java_websocket/framing/package-info.java
index d5d73d161..12e1510ec 100644
--- a/src/main/java/org/java_websocket/framing/package-info.java
+++ b/src/main/java/org/java_websocket/framing/package-info.java
@@ -24,6 +24,7 @@
*/
/**
- * This package encapsulates all interfaces and implementations in relation with the WebSocket frames.
+ * This package encapsulates all interfaces and implementations in relation with the WebSocket
+ * frames.
*/
package org.java_websocket.framing;
\ No newline at end of file
diff --git a/src/main/java/org/java_websocket/handshake/ClientHandshake.java b/src/main/java/org/java_websocket/handshake/ClientHandshake.java
index 2108b913c..f0cbc3ab9 100644
--- a/src/main/java/org/java_websocket/handshake/ClientHandshake.java
+++ b/src/main/java/org/java_websocket/handshake/ClientHandshake.java
@@ -30,9 +30,10 @@
*/
public interface ClientHandshake extends Handshakedata {
- /**
- * returns the HTTP Request-URI as defined by http://tools.ietf.org/html/rfc2616#section-5.1.2
- * @return the HTTP Request-URI
- */
- String getResourceDescriptor();
+ /**
+ * returns the HTTP Request-URI as defined by http://tools.ietf.org/html/rfc2616#section-5.1.2
+ *
+ * @return the HTTP Request-URI
+ */
+ String getResourceDescriptor();
}
diff --git a/src/main/java/org/java_websocket/handshake/ClientHandshakeBuilder.java b/src/main/java/org/java_websocket/handshake/ClientHandshakeBuilder.java
index ea69a4395..81875153d 100644
--- a/src/main/java/org/java_websocket/handshake/ClientHandshakeBuilder.java
+++ b/src/main/java/org/java_websocket/handshake/ClientHandshakeBuilder.java
@@ -30,9 +30,10 @@
*/
public interface ClientHandshakeBuilder extends HandshakeBuilder, ClientHandshake {
- /**
- * Set a specific resource descriptor
- * @param resourceDescriptor the resource descriptior to set
- */
- void setResourceDescriptor( String resourceDescriptor );
+ /**
+ * Set a specific resource descriptor
+ *
+ * @param resourceDescriptor the resource descriptior to set
+ */
+ void setResourceDescriptor(String resourceDescriptor);
}
diff --git a/src/main/java/org/java_websocket/handshake/HandshakeBuilder.java b/src/main/java/org/java_websocket/handshake/HandshakeBuilder.java
index 949f307f3..1f4de2067 100644
--- a/src/main/java/org/java_websocket/handshake/HandshakeBuilder.java
+++ b/src/main/java/org/java_websocket/handshake/HandshakeBuilder.java
@@ -30,16 +30,18 @@
*/
public interface HandshakeBuilder extends Handshakedata {
- /**
- * Setter for the content of the handshake
- * @param content the content to set
- */
- void setContent( byte[] content );
+ /**
+ * Setter for the content of the handshake
+ *
+ * @param content the content to set
+ */
+ void setContent(byte[] content);
- /**
- * Adding a specific field with a specific value
- * @param name the http field
- * @param value the value for this field
- */
- void put( String name, String value );
+ /**
+ * Adding a specific field with a specific value
+ *
+ * @param name the http field
+ * @param value the value for this field
+ */
+ void put(String name, String value);
}
diff --git a/src/main/java/org/java_websocket/handshake/HandshakeImpl1Client.java b/src/main/java/org/java_websocket/handshake/HandshakeImpl1Client.java
index f8b64e961..11ffa43dd 100644
--- a/src/main/java/org/java_websocket/handshake/HandshakeImpl1Client.java
+++ b/src/main/java/org/java_websocket/handshake/HandshakeImpl1Client.java
@@ -30,20 +30,21 @@
*/
public class HandshakeImpl1Client extends HandshakedataImpl1 implements ClientHandshakeBuilder {
- /**
- * Attribute for the resource descriptor
- */
- private String resourceDescriptor = "*";
+ /**
+ * Attribute for the resource descriptor
+ */
+ private String resourceDescriptor = "*";
- @Override
- public void setResourceDescriptor( String resourceDescriptor ) {
- if(resourceDescriptor==null)
- throw new IllegalArgumentException( "http resource descriptor must not be null" );
- this.resourceDescriptor = resourceDescriptor;
- }
+ @Override
+ public void setResourceDescriptor(String resourceDescriptor) {
+ if (resourceDescriptor == null) {
+ throw new IllegalArgumentException("http resource descriptor must not be null");
+ }
+ this.resourceDescriptor = resourceDescriptor;
+ }
- @Override
- public String getResourceDescriptor() {
- return resourceDescriptor;
- }
+ @Override
+ public String getResourceDescriptor() {
+ return resourceDescriptor;
+ }
}
diff --git a/src/main/java/org/java_websocket/handshake/HandshakeImpl1Server.java b/src/main/java/org/java_websocket/handshake/HandshakeImpl1Server.java
index 9df98d64d..87540141d 100644
--- a/src/main/java/org/java_websocket/handshake/HandshakeImpl1Server.java
+++ b/src/main/java/org/java_websocket/handshake/HandshakeImpl1Server.java
@@ -30,33 +30,33 @@
*/
public class HandshakeImpl1Server extends HandshakedataImpl1 implements ServerHandshakeBuilder {
- /**
- * Attribute for the http status
- */
- private short httpstatus;
-
- /**
- * Attribute for the http status message
- */
- private String httpstatusmessage;
-
- @Override
- public String getHttpStatusMessage() {
- return httpstatusmessage;
- }
-
- @Override
- public short getHttpStatus() {
- return httpstatus;
- }
-
- @Override
- public void setHttpStatusMessage( String message ) {
- this.httpstatusmessage = message;
- }
-
- @Override
- public void setHttpStatus( short status ) {
- httpstatus = status;
- }
+ /**
+ * Attribute for the http status
+ */
+ private short httpstatus;
+
+ /**
+ * Attribute for the http status message
+ */
+ private String httpstatusmessage;
+
+ @Override
+ public String getHttpStatusMessage() {
+ return httpstatusmessage;
+ }
+
+ @Override
+ public short getHttpStatus() {
+ return httpstatus;
+ }
+
+ @Override
+ public void setHttpStatusMessage(String message) {
+ this.httpstatusmessage = message;
+ }
+
+ @Override
+ public void setHttpStatus(short status) {
+ httpstatus = status;
+ }
}
diff --git a/src/main/java/org/java_websocket/handshake/Handshakedata.java b/src/main/java/org/java_websocket/handshake/Handshakedata.java
index f2746095b..fd270ecb6 100644
--- a/src/main/java/org/java_websocket/handshake/Handshakedata.java
+++ b/src/main/java/org/java_websocket/handshake/Handshakedata.java
@@ -32,29 +32,33 @@
*/
public interface Handshakedata {
- /**
- * Iterator for the http fields
- * @return the http fields
- */
- Iterator
- * For information on when to used fragmented frames see http://tools.ietf.org/html/rfc6455#section-5.4
- * Fragmented and normal messages can not be mixed.
- * One is however allowed to mix them with control messages like ping/pong.
- *
+ * This example shows how to send fragmented frames.
For information on when to used fragmented
+ * frames see http://tools.ietf.org/html/rfc6455#section-5.4
Fragmented and normal messages can
+ * not be mixed. One is however allowed to mix them with control messages like ping/pong.
+ *
* @see WebSocket#sendFragmentedFrame(Opcode, ByteBuffer, boolean)
**/
public class FragmentedFramesExample {
- public static void main( String[] args ) throws URISyntaxException , IOException , InterruptedException {
- // WebSocketImpl.DEBUG = true; // will give extra output
- WebSocketClient websocket = new ExampleClient( new URI( "ws://localhost:8887" ));
- if( !websocket.connectBlocking() ) {
- System.err.println( "Could not connect to the server." );
- return;
- }
+ public static void main(String[] args)
+ throws URISyntaxException, IOException, InterruptedException {
+ // WebSocketImpl.DEBUG = true; // will give extra output
+
+ WebSocketClient websocket = new ExampleClient(new URI("ws://localhost:8887"));
+ if (!websocket.connectBlocking()) {
+ System.err.println("Could not connect to the server.");
+ return;
+ }
- System.out.println( "This example shows how to send fragmented(continuous) messages." );
+ System.out.println("This example shows how to send fragmented(continuous) messages.");
- BufferedReader stdin = new BufferedReader( new InputStreamReader( System.in ) );
- while ( websocket.isOpen() ) {
- System.out.println( "Please type in a loooooong line(which then will be send in 2 byte fragments):" );
- String longline = stdin.readLine();
- ByteBuffer longelinebuffer = ByteBuffer.wrap( longline.getBytes() );
- longelinebuffer.rewind();
+ BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+ while (websocket.isOpen()) {
+ System.out
+ .println("Please type in a loooooong line(which then will be send in 2 byte fragments):");
+ String longline = stdin.readLine();
+ ByteBuffer longelinebuffer = ByteBuffer.wrap(longline.getBytes());
+ longelinebuffer.rewind();
- for( int position = 2 ; ; position += 2 ) {
- if( position < longelinebuffer.capacity() ) {
- longelinebuffer.limit( position );
- websocket.sendFragmentedFrame( Opcode.TEXT, longelinebuffer, false );// when sending binary data one should use Opcode.BINARY
- assert ( longelinebuffer.remaining() == 0 );
- // after calling sendFragmentedFrame one may reuse the buffer given to the method immediately
- } else {
- longelinebuffer.limit( longelinebuffer.capacity() );
- websocket.sendFragmentedFrame( Opcode.TEXT, longelinebuffer, true );// sending the last frame
- break;
- }
+ for (int position = 2; ; position += 2) {
+ if (position < longelinebuffer.capacity()) {
+ longelinebuffer.limit(position);
+ websocket.sendFragmentedFrame(Opcode.TEXT, longelinebuffer,
+ false);// when sending binary data one should use Opcode.BINARY
+ assert (longelinebuffer.remaining() == 0);
+ // after calling sendFragmentedFrame one may reuse the buffer given to the method immediately
+ } else {
+ longelinebuffer.limit(longelinebuffer.capacity());
+ websocket
+ .sendFragmentedFrame(Opcode.TEXT, longelinebuffer, true);// sending the last frame
+ break;
+ }
- }
- System.out.println( "You can not type in the next long message or press Ctr-C to exit." );
- }
- System.out.println( "FragmentedFramesExample terminated" );
- }
+ }
+ System.out.println("You can not type in the next long message or press Ctr-C to exit.");
+ }
+ System.out.println("FragmentedFramesExample terminated");
+ }
}
diff --git a/src/main/example/PerMessageDeflateExample.java b/src/main/example/PerMessageDeflateExample.java
index 94bc3fd2d..b557029d5 100644
--- a/src/main/example/PerMessageDeflateExample.java
+++ b/src/main/example/PerMessageDeflateExample.java
@@ -13,60 +13,71 @@
import java.util.Collections;
/**
- * This class only serves the purpose of showing how to enable PerMessageDeflateExtension for both server and client sockets.
- * Extensions are required to be registered in
+ * This class only serves the purpose of showing how to enable PerMessageDeflateExtension for both
+ * server and client sockets.
Extensions are required to be registered in
+ *
* @see Draft objects and both
* @see WebSocketClient and
* @see WebSocketServer accept a
- * @see Draft object in their constructors.
- * This example shows how to achieve it for both server and client sockets.
- * Once the connection has been established, PerMessageDeflateExtension will be enabled
- * and any messages (binary or text) will be compressed/decompressed automatically.
- * Since no additional code is required when sending or receiving messages, this example skips those parts.
+ * @see Draft object in their constructors. This example shows how to achieve it for both server and
+ * client sockets. Once the connection has been established, PerMessageDeflateExtension will be
+ * enabled and any messages (binary or text) will be compressed/decompressed automatically.
+ * Since no additional code is required when sending or receiving messages, this example skips those
+ * parts.
*/
public class PerMessageDeflateExample {
- private static final Draft perMessageDeflateDraft = new Draft_6455(new PerMessageDeflateExtension());
- private static final int PORT = 8887;
+ private static final Draft perMessageDeflateDraft = new Draft_6455(
+ new PerMessageDeflateExtension());
+ private static final int PORT = 8887;
- private static class DeflateClient extends WebSocketClient {
+ private static class DeflateClient extends WebSocketClient {
- public DeflateClient() throws URISyntaxException {
- super(new URI("ws://localhost:" + PORT), perMessageDeflateDraft);
- }
+ public DeflateClient() throws URISyntaxException {
+ super(new URI("ws://localhost:" + PORT), perMessageDeflateDraft);
+ }
- @Override
- public void onOpen(ServerHandshake handshakedata) { }
+ @Override
+ public void onOpen(ServerHandshake handshakedata) {
+ }
- @Override
- public void onMessage(String message) { }
+ @Override
+ public void onMessage(String message) {
+ }
- @Override
- public void onClose(int code, String reason, boolean remote) { }
+ @Override
+ public void onClose(int code, String reason, boolean remote) {
+ }
- @Override
- public void onError(Exception ex) { }
+ @Override
+ public void onError(Exception ex) {
}
+ }
- private static class DeflateServer extends WebSocketServer {
+ private static class DeflateServer extends WebSocketServer {
- public DeflateServer() {
- super(new InetSocketAddress(PORT), Collections.singletonList(perMessageDeflateDraft));
- }
+ public DeflateServer() {
+ super(new InetSocketAddress(PORT), Collections.singletonList(perMessageDeflateDraft));
+ }
- @Override
- public void onOpen(WebSocket conn, ClientHandshake handshake) { }
+ @Override
+ public void onOpen(WebSocket conn, ClientHandshake handshake) {
+ }
- @Override
- public void onClose(WebSocket conn, int code, String reason, boolean remote) { }
+ @Override
+ public void onClose(WebSocket conn, int code, String reason, boolean remote) {
+ }
- @Override
- public void onMessage(WebSocket conn, String message) { }
+ @Override
+ public void onMessage(WebSocket conn, String message) {
+ }
- @Override
- public void onError(WebSocket conn, Exception ex) { }
+ @Override
+ public void onError(WebSocket conn, Exception ex) {
+ }
- @Override
- public void onStart() { }
+ @Override
+ public void onStart() {
}
+ }
}
diff --git a/src/main/example/ProxyClientExample.java b/src/main/example/ProxyClientExample.java
index fbd5a8a64..4241359ed 100644
--- a/src/main/example/ProxyClientExample.java
+++ b/src/main/example/ProxyClientExample.java
@@ -29,9 +29,10 @@
import java.net.URISyntaxException;
public class ProxyClientExample {
- public static void main( String[] args ) throws URISyntaxException {
- ExampleClient c = new ExampleClient( new URI( "ws://echo.websocket.org" ) );
- c.setProxy( new Proxy( Proxy.Type.HTTP, new InetSocketAddress( "proxyaddress", 80 ) ) );
- c.connect();
- }
+
+ public static void main(String[] args) throws URISyntaxException {
+ ExampleClient c = new ExampleClient(new URI("ws://echo.websocket.org"));
+ c.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("proxyaddress", 80)));
+ c.connect();
+ }
}
diff --git a/src/main/example/ReconnectClientExample.java b/src/main/example/ReconnectClientExample.java
index ee607e47b..1eaebe1b3 100644
--- a/src/main/example/ReconnectClientExample.java
+++ b/src/main/example/ReconnectClientExample.java
@@ -32,23 +32,24 @@
* Simple example to reconnect blocking and non-blocking.
*/
public class ReconnectClientExample {
- public static void main( String[] args ) throws URISyntaxException, InterruptedException {
- ExampleClient c = new ExampleClient( new URI( "ws://localhost:8887" ) );
- //Connect to a server normally
- c.connectBlocking();
- c.send( "hi" );
- Thread.sleep( 10 );
- c.closeBlocking();
- //Disconnect manually and reconnect blocking
- c.reconnectBlocking();
- c.send( "it's" );
- Thread.sleep( 10000 );
- c.closeBlocking();
- //Disconnect manually and reconnect
- c.reconnect();
- Thread.sleep( 100 );
- c.send( "me" );
- Thread.sleep( 100 );
- c.closeBlocking();
- }
+
+ public static void main(String[] args) throws URISyntaxException, InterruptedException {
+ ExampleClient c = new ExampleClient(new URI("ws://localhost:8887"));
+ //Connect to a server normally
+ c.connectBlocking();
+ c.send("hi");
+ Thread.sleep(10);
+ c.closeBlocking();
+ //Disconnect manually and reconnect blocking
+ c.reconnectBlocking();
+ c.send("it's");
+ Thread.sleep(10000);
+ c.closeBlocking();
+ //Disconnect manually and reconnect
+ c.reconnect();
+ Thread.sleep(100);
+ c.send("me");
+ Thread.sleep(100);
+ c.closeBlocking();
+ }
}
diff --git a/src/main/example/SSLClientExample.java b/src/main/example/SSLClientExample.java
index d85fb85a7..98746e36b 100644
--- a/src/main/example/SSLClientExample.java
+++ b/src/main/example/SSLClientExample.java
@@ -42,83 +42,85 @@
class WebSocketChatClient extends WebSocketClient {
- public WebSocketChatClient( URI serverUri ) {
- super( serverUri );
- }
+ public WebSocketChatClient(URI serverUri) {
+ super(serverUri);
+ }
- @Override
- public void onOpen( ServerHandshake handshakedata ) {
- System.out.println( "Connected" );
+ @Override
+ public void onOpen(ServerHandshake handshakedata) {
+ System.out.println("Connected");
- }
+ }
- @Override
- public void onMessage( String message ) {
- System.out.println( "got: " + message );
+ @Override
+ public void onMessage(String message) {
+ System.out.println("got: " + message);
- }
+ }
- @Override
- public void onClose( int code, String reason, boolean remote ) {
- System.out.println( "Disconnected" );
+ @Override
+ public void onClose(int code, String reason, boolean remote) {
+ System.out.println("Disconnected");
- }
+ }
- @Override
- public void onError( Exception ex ) {
- ex.printStackTrace();
+ @Override
+ public void onError(Exception ex) {
+ ex.printStackTrace();
- }
+ }
}
public class SSLClientExample {
- /*
- * Keystore with certificate created like so (in JKS format):
- *
- *keytool -genkey -keyalg RSA -validity 3650 -keystore "keystore.jks" -storepass "storepassword" -keypass "keypassword" -alias "default" -dname "CN=127.0.0.1, OU=MyOrgUnit, O=MyOrg, L=MyCity, S=MyRegion, C=MyCountry"
- */
- public static void main( String[] args ) throws Exception {
- WebSocketChatClient chatclient = new WebSocketChatClient( new URI( "wss://localhost:8887" ) );
-
- // load up the key store
- String STORETYPE = "JKS";
- String KEYSTORE = Paths.get("src", "test", "java", "org", "java_websocket", "keystore.jks").toString();
- String STOREPASSWORD = "storepassword";
- String KEYPASSWORD = "keypassword";
-
- KeyStore ks = KeyStore.getInstance( STORETYPE );
- File kf = new File( KEYSTORE );
- ks.load( new FileInputStream( kf ), STOREPASSWORD.toCharArray() );
-
- KeyManagerFactory kmf = KeyManagerFactory.getInstance( "SunX509" );
- kmf.init( ks, KEYPASSWORD.toCharArray() );
- TrustManagerFactory tmf = TrustManagerFactory.getInstance( "SunX509" );
- tmf.init( ks );
-
- SSLContext sslContext = null;
- sslContext = SSLContext.getInstance( "TLS" );
- sslContext.init( kmf.getKeyManagers(), tmf.getTrustManagers(), null );
- // sslContext.init( null, null, null ); // will use java's default key and trust store which is sufficient unless you deal with self-signed certificates
-
- SSLSocketFactory factory = sslContext.getSocketFactory();// (SSLSocketFactory) SSLSocketFactory.getDefault();
-
- chatclient.setSocketFactory( factory );
-
- chatclient.connectBlocking();
-
- BufferedReader reader = new BufferedReader( new InputStreamReader( System.in ) );
- while ( true ) {
- String line = reader.readLine();
- if( line.equals( "close" ) ) {
- chatclient.closeBlocking();
- } else if ( line.equals( "open" ) ) {
- chatclient.reconnect();
- } else {
- chatclient.send( line );
- }
- }
-
- }
+ /*
+ * Keystore with certificate created like so (in JKS format):
+ *
+ *keytool -genkey -keyalg RSA -validity 3650 -keystore "keystore.jks" -storepass "storepassword" -keypass "keypassword" -alias "default" -dname "CN=127.0.0.1, OU=MyOrgUnit, O=MyOrg, L=MyCity, S=MyRegion, C=MyCountry"
+ */
+ public static void main(String[] args) throws Exception {
+ WebSocketChatClient chatclient = new WebSocketChatClient(new URI("wss://localhost:8887"));
+
+ // load up the key store
+ String STORETYPE = "JKS";
+ String KEYSTORE = Paths.get("src", "test", "java", "org", "java_websocket", "keystore.jks")
+ .toString();
+ String STOREPASSWORD = "storepassword";
+ String KEYPASSWORD = "keypassword";
+
+ KeyStore ks = KeyStore.getInstance(STORETYPE);
+ File kf = new File(KEYSTORE);
+ ks.load(new FileInputStream(kf), STOREPASSWORD.toCharArray());
+
+ KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+ kmf.init(ks, KEYPASSWORD.toCharArray());
+ TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
+ tmf.init(ks);
+
+ SSLContext sslContext = null;
+ sslContext = SSLContext.getInstance("TLS");
+ sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+ // sslContext.init( null, null, null ); // will use java's default key and trust store which is sufficient unless you deal with self-signed certificates
+
+ SSLSocketFactory factory = sslContext
+ .getSocketFactory();// (SSLSocketFactory) SSLSocketFactory.getDefault();
+
+ chatclient.setSocketFactory(factory);
+
+ chatclient.connectBlocking();
+
+ BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
+ while (true) {
+ String line = reader.readLine();
+ if (line.equals("close")) {
+ chatclient.closeBlocking();
+ } else if (line.equals("open")) {
+ chatclient.reconnect();
+ } else {
+ chatclient.send(line);
+ }
+ }
+
+ }
}
diff --git a/src/main/example/SSLServerCustomWebsocketFactoryExample.java b/src/main/example/SSLServerCustomWebsocketFactoryExample.java
index 3d834e027..2c98dac5b 100644
--- a/src/main/example/SSLServerCustomWebsocketFactoryExample.java
+++ b/src/main/example/SSLServerCustomWebsocketFactoryExample.java
@@ -43,49 +43,52 @@
*/
public class SSLServerCustomWebsocketFactoryExample {
- /*
- * Keystore with certificate created like so (in JKS format):
- *
- *keytool -genkey -validity 3650 -keystore "keystore.jks" -storepass "storepassword" -keypass "keypassword" -alias "default" -dname "CN=127.0.0.1, OU=MyOrgUnit, O=MyOrg, L=MyCity, S=MyRegion, C=MyCountry"
- */
- public static void main(String[] args) throws Exception {
- ChatServer chatserver = new ChatServer(8887); // Firefox does allow multible ssl connection only via port 443 //tested on FF16
+ /*
+ * Keystore with certificate created like so (in JKS format):
+ *
+ *keytool -genkey -validity 3650 -keystore "keystore.jks" -storepass "storepassword" -keypass "keypassword" -alias "default" -dname "CN=127.0.0.1, OU=MyOrgUnit, O=MyOrg, L=MyCity, S=MyRegion, C=MyCountry"
+ */
+ public static void main(String[] args) throws Exception {
+ ChatServer chatserver = new ChatServer(
+ 8887); // Firefox does allow multible ssl connection only via port 443 //tested on FF16
- // load up the key store
- String STORETYPE = "JKS";
- String KEYSTORE = Paths.get("src", "test", "java", "org", "java_websocket", "keystore.jks").toString();
- String STOREPASSWORD = "storepassword";
- String KEYPASSWORD = "keypassword";
+ // load up the key store
+ String STORETYPE = "JKS";
+ String KEYSTORE = Paths.get("src", "test", "java", "org", "java_websocket", "keystore.jks")
+ .toString();
+ String STOREPASSWORD = "storepassword";
+ String KEYPASSWORD = "keypassword";
- KeyStore ks = KeyStore.getInstance(STORETYPE);
- File kf = new File(KEYSTORE);
- ks.load(new FileInputStream(kf), STOREPASSWORD.toCharArray());
+ KeyStore ks = KeyStore.getInstance(STORETYPE);
+ File kf = new File(KEYSTORE);
+ ks.load(new FileInputStream(kf), STOREPASSWORD.toCharArray());
- KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
- kmf.init(ks, KEYPASSWORD.toCharArray());
- TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
- tmf.init(ks);
+ KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+ kmf.init(ks, KEYPASSWORD.toCharArray());
+ TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
+ tmf.init(ks);
- SSLContext sslContext = SSLContext.getInstance("TLS");
- sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+ SSLContext sslContext = SSLContext.getInstance("TLS");
+ sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
- //Lets remove some ciphers and protocols
- SSLEngine engine = sslContext.createSSLEngine();
- List
- *
- *
- * Handshake is also used during the end of the session, in order to properly close the connection between the two peers.
- * A proper connection close will typically include the one peer sending a CLOSE message to another, and then wait for
- * the other's CLOSE message to close the transport link. The other peer from his perspective would read a CLOSE message
- * from his peer and then enter the handshake procedure to send his own CLOSE message as well.
- *
- * @return True if the connection handshake was successful or false if an error occurred.
- * @throws IOException - if an error occurs during read/write to the socket channel.
- */
- private boolean doHandshake() throws IOException {
- SSLEngineResult result;
- HandshakeStatus handshakeStatus;
-
- // NioSslPeer's fields myAppData and peerAppData are supposed to be large enough to hold all message data the peer
- // will send and expects to receive from the other peer respectively. Since the messages to be exchanged will usually be less
- // than 16KB long the capacity of these fields should also be smaller. Here we initialize these two local buffers
- // to be used for the handshake, while keeping client's buffers at the same size.
- int appBufferSize = engine.getSession().getApplicationBufferSize();
- myAppData = ByteBuffer.allocate( appBufferSize );
- peerAppData = ByteBuffer.allocate( appBufferSize );
- myNetData.clear();
- peerNetData.clear();
-
- handshakeStatus = engine.getHandshakeStatus();
- boolean handshakeComplete = false;
- while( !handshakeComplete) {
- switch(handshakeStatus) {
- case FINISHED:
- handshakeComplete = !this.peerNetData.hasRemaining();
- if (handshakeComplete)
- return true;
- socketChannel.write(this.peerNetData);
- break;
- case NEED_UNWRAP:
- if( socketChannel.read( peerNetData ) < 0 ) {
- if( engine.isInboundDone() && engine.isOutboundDone() ) {
- return false;
- }
- try {
- engine.closeInbound();
- } catch ( SSLException e ) {
- //Ignore, can't do anything against this exception
- }
- engine.closeOutbound();
- // After closeOutbound the engine will be set to WRAP state, in order to try to send a close message to the client.
- handshakeStatus = engine.getHandshakeStatus();
- break;
- }
- peerNetData.flip();
- try {
- result = engine.unwrap( peerNetData, peerAppData );
- peerNetData.compact();
- handshakeStatus = result.getHandshakeStatus();
- } catch ( SSLException sslException ) {
- engine.closeOutbound();
- handshakeStatus = engine.getHandshakeStatus();
- break;
- }
- switch(result.getStatus()) {
- case OK:
- break;
- case BUFFER_OVERFLOW:
- // Will occur when peerAppData's capacity is smaller than the data derived from peerNetData's unwrap.
- peerAppData = enlargeApplicationBuffer( peerAppData );
- break;
- case BUFFER_UNDERFLOW:
- // Will occur either when no data was read from the peer or when the peerNetData buffer was too small to hold all peer's data.
- peerNetData = handleBufferUnderflow( peerNetData );
- break;
- case CLOSED:
- if( engine.isOutboundDone() ) {
- return false;
- } else {
- engine.closeOutbound();
- handshakeStatus = engine.getHandshakeStatus();
- break;
- }
- default:
- throw new IllegalStateException( "Invalid SSL status: " + result.getStatus() );
- }
- break;
- case NEED_WRAP:
- myNetData.clear();
- try {
- result = engine.wrap( myAppData, myNetData );
- handshakeStatus = result.getHandshakeStatus();
- } catch ( SSLException sslException ) {
- engine.closeOutbound();
- handshakeStatus = engine.getHandshakeStatus();
- break;
- }
- switch(result.getStatus()) {
- case OK:
- myNetData.flip();
- while( myNetData.hasRemaining() ) {
- socketChannel.write( myNetData );
- }
- break;
- case BUFFER_OVERFLOW:
- // Will occur if there is not enough space in myNetData buffer to write all the data that would be generated by the method wrap.
- // Since myNetData is set to session's packet size we should not get to this point because SSLEngine is supposed
- // to produce messages smaller or equal to that, but a general handling would be the following:
- myNetData = enlargePacketBuffer( myNetData );
- break;
- case BUFFER_UNDERFLOW:
- throw new SSLException( "Buffer underflow occurred after a wrap. I don't think we should ever get here." );
- case CLOSED:
- try {
- myNetData.flip();
- while( myNetData.hasRemaining() ) {
- socketChannel.write( myNetData );
- }
- // At this point the handshake status will probably be NEED_UNWRAP so we make sure that peerNetData is clear to read.
- peerNetData.clear();
- } catch ( Exception e ) {
- handshakeStatus = engine.getHandshakeStatus();
- }
- break;
- default:
- throw new IllegalStateException( "Invalid SSL status: " + result.getStatus() );
- }
- break;
- case NEED_TASK:
- Runnable task;
- while( ( task = engine.getDelegatedTask() ) != null ) {
- executor.execute( task );
- }
- handshakeStatus = engine.getHandshakeStatus();
- break;
-
- case NOT_HANDSHAKING:
- break;
- default:
- throw new IllegalStateException( "Invalid SSL status: " + handshakeStatus );
- }
- }
-
- return true;
-
- }
-
- /**
- * Enlarging a packet buffer (peerNetData or myNetData)
- *
- * @param buffer the buffer to enlarge
- * @return the enlarged buffer
- */
- private ByteBuffer enlargePacketBuffer( ByteBuffer buffer ) {
- return enlargeBuffer( buffer, engine.getSession().getPacketBufferSize() );
- }
-
- /**
- * Enlarging a packet buffer (peerAppData or myAppData)
- *
- * @param buffer the buffer to enlarge
- * @return the enlarged buffer
- */
- private ByteBuffer enlargeApplicationBuffer( ByteBuffer buffer ) {
- return enlargeBuffer( buffer, engine.getSession().getApplicationBufferSize() );
- }
-
- /**
- * Compares sessionProposedCapacity with buffer's capacity. If buffer's capacity is smaller,
- * returns a buffer with the proposed capacity. If it's equal or larger, returns a buffer
- * with capacity twice the size of the initial one.
- *
- * @param buffer - the buffer to be enlarged.
- * @param sessionProposedCapacity - the minimum size of the new buffer, proposed by {@link SSLSession}.
- * @return A new buffer with a larger capacity.
- */
- private ByteBuffer enlargeBuffer( ByteBuffer buffer, int sessionProposedCapacity ) {
- if( sessionProposedCapacity > buffer.capacity() ) {
- buffer = ByteBuffer.allocate( sessionProposedCapacity );
- } else {
- buffer = ByteBuffer.allocate( buffer.capacity() * 2 );
- }
- return buffer;
- }
-
- /**
- * Handles {@link SSLEngineResult.Status#BUFFER_UNDERFLOW}. Will check if the buffer is already filled, and if there is no space problem
- * will return the same buffer, so the client tries to read again. If the buffer is already filled will try to enlarge the buffer either to
- * session's proposed size or to a larger capacity. A buffer underflow can happen only after an unwrap, so the buffer will always be a
- * peerNetData buffer.
- *
- * @param buffer - will always be peerNetData buffer.
- * @return The same buffer if there is no space problem or a new buffer with the same data but more space.
- */
- private ByteBuffer handleBufferUnderflow( ByteBuffer buffer ) {
- if( engine.getSession().getPacketBufferSize() < buffer.limit() ) {
- return buffer;
- } else {
- ByteBuffer replaceBuffer = enlargePacketBuffer( buffer );
- buffer.flip();
- replaceBuffer.put( buffer );
- return replaceBuffer;
- }
- }
-
- /**
- * This method should be called when this peer wants to explicitly close the connection
- * or when a close message has arrived from the other peer, in order to provide an orderly shutdown.
- *
- * It first calls {@link SSLEngine#closeOutbound()} which prepares this peer to send its own close message and
- * sets {@link SSLEngine} to the NEED_WRAP state. Then, it delegates the exchange of close messages
- * to the handshake method and finally, it closes socket channel.
- *
- * @throws IOException if an I/O error occurs to the socket channel.
- */
- private void closeConnection() throws IOException {
- engine.closeOutbound();
- try {
- doHandshake();
- } catch ( IOException e ) {
- //Just ignore this exception since we are closing the connection already
- }
- socketChannel.close();
- }
-
- /**
- * In addition to orderly shutdowns, an unorderly shutdown may occur, when the transport link (socket channel)
- * is severed before close messages are exchanged. This may happen by getting an -1 or {@link IOException}
- * when trying to read from the socket channel, or an {@link IOException} when trying to write to it.
- * In both cases {@link SSLEngine#closeInbound()} should be called and then try to follow the standard procedure.
- *
- * @throws IOException if an I/O error occurs to the socket channel.
- */
- private void handleEndOfStream() throws IOException {
- try {
- engine.closeInbound();
- } catch ( Exception e ) {
- log.error( "This engine was forced to close inbound, without having received the proper SSL/TLS close notification message from the peer, due to end of stream." );
- }
- closeConnection();
- }
-
- @Override
- public boolean isNeedWrite() {
- return false;
- }
-
- @Override
- public void writeMore() throws IOException {
- //Nothing to do since we write out all the data in a while loop
- }
-
- @Override
- public boolean isNeedRead() {
- return peerNetData.hasRemaining() || peerAppData.hasRemaining();
- }
-
- @Override
- public int readMore( ByteBuffer dst ) throws IOException {
- return read( dst );
- }
-
- @Override
- public boolean isBlocking() {
- return socketChannel.isBlocking();
- }
-
-
- @Override
- public boolean isOpen() {
- return socketChannel.isOpen();
- }
-
- @Override
- public void close() throws IOException {
- closeConnection();
- }
-
- @Override
- public SSLEngine getSSLEngine() {
- return engine;
- }
+ /**
+ * Logger instance
+ *
+ * @since 1.4.0
+ */
+ private final Logger log = LoggerFactory.getLogger(SSLSocketChannel.class);
+
+ /**
+ * The underlying socket channel
+ */
+ private final SocketChannel socketChannel;
+
+ /**
+ * The engine which will be used for un-/wrapping of buffers
+ */
+ private final SSLEngine engine;
+
+
+ /**
+ * Will contain this peer's application data in plaintext, that will be later encrypted using
+ * {@link SSLEngine#wrap(ByteBuffer, ByteBuffer)} and sent to the other peer. This buffer can
+ * typically be of any size, as long as it is large enough to contain this peer's outgoing
+ * messages. If this peer tries to send a message bigger than buffer's capacity a {@link
+ * BufferOverflowException} will be thrown.
+ */
+ private ByteBuffer myAppData;
+
+ /**
+ * Will contain this peer's encrypted data, that will be generated after {@link
+ * SSLEngine#wrap(ByteBuffer, ByteBuffer)} is applied on {@link SSLSocketChannel#myAppData}. It
+ * should be initialized using {@link SSLSession#getPacketBufferSize()}, which returns the size up
+ * to which, SSL/TLS packets will be generated from the engine under a session. All SSLEngine
+ * network buffers should be sized at least this large to avoid insufficient space problems when
+ * performing wrap and unwrap calls.
+ */
+ private ByteBuffer myNetData;
+
+ /**
+ * Will contain the other peer's (decrypted) application data. It must be large enough to hold the
+ * application data from any peer. Can be initialized with {@link SSLSession#getApplicationBufferSize()}
+ * for an estimation of the other peer's application data and should be enlarged if this size is
+ * not enough.
+ */
+ private ByteBuffer peerAppData;
+
+ /**
+ * Will contain the other peer's encrypted data. The SSL/TLS protocols specify that
+ * implementations should produce packets containing at most 16 KB of plaintext, so a buffer sized
+ * to this value should normally cause no capacity problems. However, some implementations violate
+ * the specification and generate large records up to 32 KB. If the {@link
+ * SSLEngine#unwrap(ByteBuffer, ByteBuffer)} detects large inbound packets, the buffer sizes
+ * returned by SSLSession will be updated dynamically, so the this peer should check for overflow
+ * conditions and enlarge the buffer using the session's (updated) buffer size.
+ */
+ private ByteBuffer peerNetData;
+
+ /**
+ * Will be used to execute tasks that may emerge during handshake in parallel with the server's
+ * main thread.
+ */
+ private ExecutorService executor;
+
+
+ public SSLSocketChannel(SocketChannel inputSocketChannel, SSLEngine inputEngine,
+ ExecutorService inputExecutor, SelectionKey key) throws IOException {
+ if (inputSocketChannel == null || inputEngine == null || executor == inputExecutor) {
+ throw new IllegalArgumentException("parameter must not be null");
+ }
+
+ this.socketChannel = inputSocketChannel;
+ this.engine = inputEngine;
+ this.executor = inputExecutor;
+ myNetData = ByteBuffer.allocate(engine.getSession().getPacketBufferSize());
+ peerNetData = ByteBuffer.allocate(engine.getSession().getPacketBufferSize());
+ this.engine.beginHandshake();
+ if (doHandshake()) {
+ if (key != null) {
+ key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
+ }
+ } else {
+ try {
+ socketChannel.close();
+ } catch (IOException e) {
+ log.error("Exception during the closing of the channel", e);
+ }
+ }
+ }
+
+ @Override
+ public synchronized int read(ByteBuffer dst) throws IOException {
+ if (!dst.hasRemaining()) {
+ return 0;
+ }
+ if (peerAppData.hasRemaining()) {
+ peerAppData.flip();
+ return ByteBufferUtils.transferByteBuffer(peerAppData, dst);
+ }
+ peerNetData.compact();
+
+ int bytesRead = socketChannel.read(peerNetData);
+ /*
+ * If bytesRead are 0 put we still have some data in peerNetData still to an unwrap (for testcase 1.1.6)
+ */
+ if (bytesRead > 0 || peerNetData.hasRemaining()) {
+ peerNetData.flip();
+ while (peerNetData.hasRemaining()) {
+ peerAppData.compact();
+ SSLEngineResult result;
+ try {
+ result = engine.unwrap(peerNetData, peerAppData);
+ } catch (SSLException e) {
+ log.error("SSLException during unwrap", e);
+ throw e;
+ }
+ switch (result.getStatus()) {
+ case OK:
+ peerAppData.flip();
+ return ByteBufferUtils.transferByteBuffer(peerAppData, dst);
+ case BUFFER_UNDERFLOW:
+ peerAppData.flip();
+ return ByteBufferUtils.transferByteBuffer(peerAppData, dst);
+ case BUFFER_OVERFLOW:
+ peerAppData = enlargeApplicationBuffer(peerAppData);
+ return read(dst);
+ case CLOSED:
+ closeConnection();
+ dst.clear();
+ return -1;
+ default:
+ throw new IllegalStateException("Invalid SSL status: " + result.getStatus());
+ }
+ }
+ } else if (bytesRead < 0) {
+ handleEndOfStream();
+ }
+ ByteBufferUtils.transferByteBuffer(peerAppData, dst);
+ return bytesRead;
+ }
+
+ @Override
+ public synchronized int write(ByteBuffer output) throws IOException {
+ int num = 0;
+ while (output.hasRemaining()) {
+ // The loop has a meaning for (outgoing) messages larger than 16KB.
+ // Every wrap call will remove 16KB from the original message and send it to the remote peer.
+ myNetData.clear();
+ SSLEngineResult result = engine.wrap(output, myNetData);
+ switch (result.getStatus()) {
+ case OK:
+ myNetData.flip();
+ while (myNetData.hasRemaining()) {
+ num += socketChannel.write(myNetData);
+ }
+ break;
+ case BUFFER_OVERFLOW:
+ myNetData = enlargePacketBuffer(myNetData);
+ break;
+ case BUFFER_UNDERFLOW:
+ throw new SSLException(
+ "Buffer underflow occurred after a wrap. I don't think we should ever get here.");
+ case CLOSED:
+ closeConnection();
+ return 0;
+ default:
+ throw new IllegalStateException("Invalid SSL status: " + result.getStatus());
+ }
+ }
+ return num;
+ }
+
+ /**
+ * Implements the handshake protocol between two peers, required for the establishment of the
+ * SSL/TLS connection. During the handshake, encryption configuration information - such as the
+ * list of available cipher suites - will be exchanged and if the handshake is successful will
+ * lead to an established SSL/TLS session.
+ *
+ *
+ *
+ * Handshake is also used during the end of the session, in order to properly close the connection between the two peers.
+ * A proper connection close will typically include the one peer sending a CLOSE message to another, and then wait for
+ * the other's CLOSE message to close the transport link. The other peer from his perspective would read a CLOSE message
+ * from his peer and then enter the handshake procedure to send his own CLOSE message as well.
+ *
+ * @return True if the connection handshake was successful or false if an error occurred.
+ * @throws IOException - if an error occurs during read/write to the socket channel.
+ */
+ private boolean doHandshake() throws IOException {
+ SSLEngineResult result;
+ HandshakeStatus handshakeStatus;
+
+ // NioSslPeer's fields myAppData and peerAppData are supposed to be large enough to hold all message data the peer
+ // will send and expects to receive from the other peer respectively. Since the messages to be exchanged will usually be less
+ // than 16KB long the capacity of these fields should also be smaller. Here we initialize these two local buffers
+ // to be used for the handshake, while keeping client's buffers at the same size.
+ int appBufferSize = engine.getSession().getApplicationBufferSize();
+ myAppData = ByteBuffer.allocate(appBufferSize);
+ peerAppData = ByteBuffer.allocate(appBufferSize);
+ myNetData.clear();
+ peerNetData.clear();
+
+ handshakeStatus = engine.getHandshakeStatus();
+ boolean handshakeComplete = false;
+ while (!handshakeComplete) {
+ switch (handshakeStatus) {
+ case FINISHED:
+ handshakeComplete = !this.peerNetData.hasRemaining();
+ if (handshakeComplete) {
+ return true;
+ }
+ socketChannel.write(this.peerNetData);
+ break;
+ case NEED_UNWRAP:
+ if (socketChannel.read(peerNetData) < 0) {
+ if (engine.isInboundDone() && engine.isOutboundDone()) {
+ return false;
+ }
+ try {
+ engine.closeInbound();
+ } catch (SSLException e) {
+ //Ignore, can't do anything against this exception
+ }
+ engine.closeOutbound();
+ // After closeOutbound the engine will be set to WRAP state, in order to try to send a close message to the client.
+ handshakeStatus = engine.getHandshakeStatus();
+ break;
+ }
+ peerNetData.flip();
+ try {
+ result = engine.unwrap(peerNetData, peerAppData);
+ peerNetData.compact();
+ handshakeStatus = result.getHandshakeStatus();
+ } catch (SSLException sslException) {
+ engine.closeOutbound();
+ handshakeStatus = engine.getHandshakeStatus();
+ break;
+ }
+ switch (result.getStatus()) {
+ case OK:
+ break;
+ case BUFFER_OVERFLOW:
+ // Will occur when peerAppData's capacity is smaller than the data derived from peerNetData's unwrap.
+ peerAppData = enlargeApplicationBuffer(peerAppData);
+ break;
+ case BUFFER_UNDERFLOW:
+ // Will occur either when no data was read from the peer or when the peerNetData buffer was too small to hold all peer's data.
+ peerNetData = handleBufferUnderflow(peerNetData);
+ break;
+ case CLOSED:
+ if (engine.isOutboundDone()) {
+ return false;
+ } else {
+ engine.closeOutbound();
+ handshakeStatus = engine.getHandshakeStatus();
+ break;
+ }
+ default:
+ throw new IllegalStateException("Invalid SSL status: " + result.getStatus());
+ }
+ break;
+ case NEED_WRAP:
+ myNetData.clear();
+ try {
+ result = engine.wrap(myAppData, myNetData);
+ handshakeStatus = result.getHandshakeStatus();
+ } catch (SSLException sslException) {
+ engine.closeOutbound();
+ handshakeStatus = engine.getHandshakeStatus();
+ break;
+ }
+ switch (result.getStatus()) {
+ case OK:
+ myNetData.flip();
+ while (myNetData.hasRemaining()) {
+ socketChannel.write(myNetData);
+ }
+ break;
+ case BUFFER_OVERFLOW:
+ // Will occur if there is not enough space in myNetData buffer to write all the data that would be generated by the method wrap.
+ // Since myNetData is set to session's packet size we should not get to this point because SSLEngine is supposed
+ // to produce messages smaller or equal to that, but a general handling would be the following:
+ myNetData = enlargePacketBuffer(myNetData);
+ break;
+ case BUFFER_UNDERFLOW:
+ throw new SSLException(
+ "Buffer underflow occurred after a wrap. I don't think we should ever get here.");
+ case CLOSED:
+ try {
+ myNetData.flip();
+ while (myNetData.hasRemaining()) {
+ socketChannel.write(myNetData);
+ }
+ // At this point the handshake status will probably be NEED_UNWRAP so we make sure that peerNetData is clear to read.
+ peerNetData.clear();
+ } catch (Exception e) {
+ handshakeStatus = engine.getHandshakeStatus();
+ }
+ break;
+ default:
+ throw new IllegalStateException("Invalid SSL status: " + result.getStatus());
+ }
+ break;
+ case NEED_TASK:
+ Runnable task;
+ while ((task = engine.getDelegatedTask()) != null) {
+ executor.execute(task);
+ }
+ handshakeStatus = engine.getHandshakeStatus();
+ break;
+
+ case NOT_HANDSHAKING:
+ break;
+ default:
+ throw new IllegalStateException("Invalid SSL status: " + handshakeStatus);
+ }
+ }
+
+ return true;
+
+ }
+
+ /**
+ * Enlarging a packet buffer (peerNetData or myNetData)
+ *
+ * @param buffer the buffer to enlarge
+ * @return the enlarged buffer
+ */
+ private ByteBuffer enlargePacketBuffer(ByteBuffer buffer) {
+ return enlargeBuffer(buffer, engine.getSession().getPacketBufferSize());
+ }
+
+ /**
+ * Enlarging a packet buffer (peerAppData or myAppData)
+ *
+ * @param buffer the buffer to enlarge
+ * @return the enlarged buffer
+ */
+ private ByteBuffer enlargeApplicationBuffer(ByteBuffer buffer) {
+ return enlargeBuffer(buffer, engine.getSession().getApplicationBufferSize());
+ }
+
+ /**
+ * Compares sessionProposedCapacity with buffer's capacity. If buffer's capacity is
+ * smaller, returns a buffer with the proposed capacity. If it's equal or larger, returns a buffer
+ * with capacity twice the size of the initial one.
+ *
+ * @param buffer - the buffer to be enlarged.
+ * @param sessionProposedCapacity - the minimum size of the new buffer, proposed by {@link
+ * SSLSession}.
+ * @return A new buffer with a larger capacity.
+ */
+ private ByteBuffer enlargeBuffer(ByteBuffer buffer, int sessionProposedCapacity) {
+ if (sessionProposedCapacity > buffer.capacity()) {
+ buffer = ByteBuffer.allocate(sessionProposedCapacity);
+ } else {
+ buffer = ByteBuffer.allocate(buffer.capacity() * 2);
+ }
+ return buffer;
+ }
+
+ /**
+ * Handles {@link SSLEngineResult.Status#BUFFER_UNDERFLOW}. Will check if the buffer is already
+ * filled, and if there is no space problem will return the same buffer, so the client tries to
+ * read again. If the buffer is already filled will try to enlarge the buffer either to session's
+ * proposed size or to a larger capacity. A buffer underflow can happen only after an unwrap, so
+ * the buffer will always be a peerNetData buffer.
+ *
+ * @param buffer - will always be peerNetData buffer.
+ * @return The same buffer if there is no space problem or a new buffer with the same data but
+ * more space.
+ */
+ private ByteBuffer handleBufferUnderflow(ByteBuffer buffer) {
+ if (engine.getSession().getPacketBufferSize() < buffer.limit()) {
+ return buffer;
+ } else {
+ ByteBuffer replaceBuffer = enlargePacketBuffer(buffer);
+ buffer.flip();
+ replaceBuffer.put(buffer);
+ return replaceBuffer;
+ }
+ }
+
+ /**
+ * This method should be called when this peer wants to explicitly close the connection or when a
+ * close message has arrived from the other peer, in order to provide an orderly shutdown.
+ *
+ * It first calls {@link SSLEngine#closeOutbound()} which prepares this peer to send its own close
+ * message and sets {@link SSLEngine} to the NEED_WRAP state. Then, it delegates the
+ * exchange of close messages to the handshake method and finally, it closes socket channel.
+ *
+ * @throws IOException if an I/O error occurs to the socket channel.
+ */
+ private void closeConnection() throws IOException {
+ engine.closeOutbound();
+ try {
+ doHandshake();
+ } catch (IOException e) {
+ //Just ignore this exception since we are closing the connection already
+ }
+ socketChannel.close();
+ }
+
+ /**
+ * In addition to orderly shutdowns, an unorderly shutdown may occur, when the transport link
+ * (socket channel) is severed before close messages are exchanged. This may happen by getting an
+ * -1 or {@link IOException} when trying to read from the socket channel, or an {@link
+ * IOException} when trying to write to it. In both cases {@link SSLEngine#closeInbound()} should
+ * be called and then try to follow the standard procedure.
+ *
+ * @throws IOException if an I/O error occurs to the socket channel.
+ */
+ private void handleEndOfStream() throws IOException {
+ try {
+ engine.closeInbound();
+ } catch (Exception e) {
+ log.error(
+ "This engine was forced to close inbound, without having received the proper SSL/TLS close notification message from the peer, due to end of stream.");
+ }
+ closeConnection();
+ }
+
+ @Override
+ public boolean isNeedWrite() {
+ return false;
+ }
+
+ @Override
+ public void writeMore() throws IOException {
+ //Nothing to do since we write out all the data in a while loop
+ }
+
+ @Override
+ public boolean isNeedRead() {
+ return peerNetData.hasRemaining() || peerAppData.hasRemaining();
+ }
+
+ @Override
+ public int readMore(ByteBuffer dst) throws IOException {
+ return read(dst);
+ }
+
+ @Override
+ public boolean isBlocking() {
+ return socketChannel.isBlocking();
+ }
+
+
+ @Override
+ public boolean isOpen() {
+ return socketChannel.isOpen();
+ }
+
+ @Override
+ public void close() throws IOException {
+ closeConnection();
+ }
+
+ @Override
+ public SSLEngine getSSLEngine() {
+ return engine;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/org/java_websocket/SSLSocketChannel2.java b/src/main/java/org/java_websocket/SSLSocketChannel2.java
index ccf21fc26..9689ae2d1 100644
--- a/src/main/java/org/java_websocket/SSLSocketChannel2.java
+++ b/src/main/java/org/java_websocket/SSLSocketChannel2.java
@@ -55,409 +55,443 @@
*/
public class SSLSocketChannel2 implements ByteChannel, WrappedByteChannel, ISSLChannel {
- /**
- * This object is used to feed the {@link SSLEngine}'s wrap and unwrap methods during the handshake phase.
- **/
- protected static ByteBuffer emptybuffer = ByteBuffer.allocate( 0 );
-
- /**
- * Logger instance
- *
- * @since 1.4.0
- */
- private final Logger log = LoggerFactory.getLogger(SSLSocketChannel2.class);
-
- protected ExecutorService exec;
-
- protected List
- * When not in blocking mode 0 may be returned.
- *
- * @return the number of bytes read.
- **/
- public int read(ByteBuffer dst) throws IOException {
- tryRestoreCryptedData();
- while (true) {
- if (!dst.hasRemaining())
- return 0;
- if (!isHandShakeComplete()) {
- if (isBlocking()) {
- while (!isHandShakeComplete()) {
- processHandshake();
- }
- } else {
- processHandshake();
- if (!isHandShakeComplete()) {
- return 0;
- }
- }
- }
- // assert ( bufferallocations > 1 ); //see #190
- //if( bufferallocations <= 1 ) {
- // createBuffers( sslEngine.getSession() );
- //}
- /* 1. When "dst" is smaller than "inData" readRemaining will fill "dst" with data decoded in a previous read call.
- * 2. When "inCrypt" contains more data than "inData" has remaining space, unwrap has to be called on more time(readRemaining)
- */
- int purged = readRemaining(dst);
- if (purged != 0)
- return purged;
-
- /* We only continue when we really need more data from the network.
- * Thats the case if inData is empty or inCrypt holds to less data than necessary for decryption
- */
- assert (inData.position() == 0);
- inData.clear();
-
- if (!inCrypt.hasRemaining())
- inCrypt.clear();
- else
- inCrypt.compact();
-
- if (isBlocking() || readEngineResult.getStatus() == Status.BUFFER_UNDERFLOW)
- if (socketChannel.read(inCrypt) == -1) {
- return -1;
- }
- inCrypt.flip();
- unwrap();
-
- int transferred = transfereTo(inData, dst);
- if (transferred == 0 && isBlocking()) {
- continue;
- }
- return transferred;
+ if (sslEngine.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.NEED_UNWRAP) {
+ if (!isBlocking() || readEngineResult.getStatus() == Status.BUFFER_UNDERFLOW) {
+ inCrypt.compact();
+ int read = socketChannel.read(inCrypt);
+ if (read == -1) {
+ throw new IOException("connection closed unexpectedly by peer");
}
+ inCrypt.flip();
+ }
+ inData.compact();
+ unwrap();
+ if (readEngineResult.getHandshakeStatus() == HandshakeStatus.FINISHED) {
+ createBuffers(sslEngine.getSession());
+ return;
+ }
}
- /**
- * {@link #read(ByteBuffer)} may not be to leave all buffers(inData, inCrypt)
- **/
- private int readRemaining( ByteBuffer dst ) throws SSLException {
- if( inData.hasRemaining() ) {
- return transfereTo( inData, dst );
- }
- if( !inData.hasRemaining() )
- inData.clear();
- tryRestoreCryptedData();
- // test if some bytes left from last read (e.g. BUFFER_UNDERFLOW)
- if( inCrypt.hasRemaining() ) {
- unwrap();
- int amount = transfereTo( inData, dst );
- if (readEngineResult.getStatus() == SSLEngineResult.Status.CLOSED) {
- return -1;
- }
- if( amount > 0 )
- return amount;
- }
- return 0;
+ consumeDelegatedTasks();
+ if (tasks.isEmpty()
+ || sslEngine.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.NEED_WRAP) {
+ socketChannel.write(wrap(emptybuffer));
+ if (writeEngineResult.getHandshakeStatus() == HandshakeStatus.FINISHED) {
+ createBuffers(sslEngine.getSession());
+ return;
+ }
}
-
- public boolean isConnected() {
- return socketChannel.isConnected();
+ assert (sslEngine.getHandshakeStatus()
+ != HandshakeStatus.NOT_HANDSHAKING);// this function could only leave NOT_HANDSHAKING after createBuffers was called unless #190 occurs which means that nio wrap/unwrap never return HandshakeStatus.FINISHED
+
+ bufferallocations = 1; // look at variable declaration why this line exists and #190. Without this line buffers would not be be recreated when #190 AND a rehandshake occur.
+ }
+
+ private synchronized ByteBuffer wrap(ByteBuffer b) throws SSLException {
+ outCrypt.compact();
+ writeEngineResult = sslEngine.wrap(b, outCrypt);
+ outCrypt.flip();
+ return outCrypt;
+ }
+
+ /**
+ * performs the unwrap operation by unwrapping from {@link #inCrypt} to {@link #inData}
+ **/
+ private synchronized ByteBuffer unwrap() throws SSLException {
+ int rem;
+ //There are some ssl test suites, which get around the selector.select() call, which cause an infinite unwrap and 100% cpu usage (see #459 and #458)
+ if (readEngineResult.getStatus() == SSLEngineResult.Status.CLOSED
+ && sslEngine.getHandshakeStatus() == HandshakeStatus.NOT_HANDSHAKING) {
+ try {
+ close();
+ } catch (IOException e) {
+ //Not really interesting
+ }
}
-
- public void close() throws IOException {
- sslEngine.closeOutbound();
- sslEngine.getSession().invalidate();
- if( socketChannel.isOpen() )
- socketChannel.write( wrap( emptybuffer ) );// FIXME what if not all bytes can be written
- socketChannel.close();
+ do {
+ rem = inData.remaining();
+ readEngineResult = sslEngine.unwrap(inCrypt, inData);
+ } while (readEngineResult.getStatus() == SSLEngineResult.Status.OK && (rem != inData.remaining()
+ || sslEngine.getHandshakeStatus() == HandshakeStatus.NEED_UNWRAP));
+ inData.flip();
+ return inData;
+ }
+
+ protected void consumeDelegatedTasks() {
+ Runnable task;
+ while ((task = sslEngine.getDelegatedTask()) != null) {
+ tasks.add(exec.submit(task));
+ // task.run();
}
-
- private boolean isHandShakeComplete() {
- HandshakeStatus status = sslEngine.getHandshakeStatus();
- return status == SSLEngineResult.HandshakeStatus.FINISHED || status == SSLEngineResult.HandshakeStatus.NOT_HANDSHAKING;
+ }
+
+ protected void createBuffers(SSLSession session) {
+ saveCryptedData(); // save any remaining data in inCrypt
+ int netBufferMax = session.getPacketBufferSize();
+ int appBufferMax = Math.max(session.getApplicationBufferSize(), netBufferMax);
+
+ if (inData == null) {
+ inData = ByteBuffer.allocate(appBufferMax);
+ outCrypt = ByteBuffer.allocate(netBufferMax);
+ inCrypt = ByteBuffer.allocate(netBufferMax);
+ } else {
+ if (inData.capacity() != appBufferMax) {
+ inData = ByteBuffer.allocate(appBufferMax);
+ }
+ if (outCrypt.capacity() != netBufferMax) {
+ outCrypt = ByteBuffer.allocate(netBufferMax);
+ }
+ if (inCrypt.capacity() != netBufferMax) {
+ inCrypt = ByteBuffer.allocate(netBufferMax);
+ }
}
-
- public SelectableChannel configureBlocking( boolean b ) throws IOException {
- return socketChannel.configureBlocking( b );
+ if (inData.remaining() != 0 && log.isTraceEnabled()) {
+ log.trace(new String(inData.array(), inData.position(), inData.remaining()));
}
-
- public boolean connect( SocketAddress remote ) throws IOException {
- return socketChannel.connect( remote );
+ inData.rewind();
+ inData.flip();
+ if (inCrypt.remaining() != 0 && log.isTraceEnabled()) {
+ log.trace(new String(inCrypt.array(), inCrypt.position(), inCrypt.remaining()));
}
-
- public boolean finishConnect() throws IOException {
- return socketChannel.finishConnect();
+ inCrypt.rewind();
+ inCrypt.flip();
+ outCrypt.rewind();
+ outCrypt.flip();
+ bufferallocations++;
+ }
+
+ public int write(ByteBuffer src) throws IOException {
+ if (!isHandShakeComplete()) {
+ processHandshake();
+ return 0;
}
-
- public Socket socket() {
- return socketChannel.socket();
+ // assert ( bufferallocations > 1 ); //see #190
+ //if( bufferallocations <= 1 ) {
+ // createBuffers( sslEngine.getSession() );
+ //}
+ int num = socketChannel.write(wrap(src));
+ if (writeEngineResult.getStatus() == SSLEngineResult.Status.CLOSED) {
+ throw new EOFException("Connection is closed");
}
-
- public boolean isInboundDone() {
- return sslEngine.isInboundDone();
+ return num;
+
+ }
+
+ /**
+ * Blocks when in blocking mode until at least one byte has been decoded.
When not in blocking
+ * mode 0 may be returned.
+ *
+ * @return the number of bytes read.
+ **/
+ public int read(ByteBuffer dst) throws IOException {
+ tryRestoreCryptedData();
+ while (true) {
+ if (!dst.hasRemaining()) {
+ return 0;
+ }
+ if (!isHandShakeComplete()) {
+ if (isBlocking()) {
+ while (!isHandShakeComplete()) {
+ processHandshake();
+ }
+ } else {
+ processHandshake();
+ if (!isHandShakeComplete()) {
+ return 0;
+ }
+ }
+ }
+ // assert ( bufferallocations > 1 ); //see #190
+ //if( bufferallocations <= 1 ) {
+ // createBuffers( sslEngine.getSession() );
+ //}
+ /* 1. When "dst" is smaller than "inData" readRemaining will fill "dst" with data decoded in a previous read call.
+ * 2. When "inCrypt" contains more data than "inData" has remaining space, unwrap has to be called on more time(readRemaining)
+ */
+ int purged = readRemaining(dst);
+ if (purged != 0) {
+ return purged;
+ }
+
+ /* We only continue when we really need more data from the network.
+ * Thats the case if inData is empty or inCrypt holds to less data than necessary for decryption
+ */
+ assert (inData.position() == 0);
+ inData.clear();
+
+ if (!inCrypt.hasRemaining()) {
+ inCrypt.clear();
+ } else {
+ inCrypt.compact();
+ }
+
+ if (isBlocking() || readEngineResult.getStatus() == Status.BUFFER_UNDERFLOW) {
+ if (socketChannel.read(inCrypt) == -1) {
+ return -1;
+ }
+ }
+ inCrypt.flip();
+ unwrap();
+
+ int transferred = transfereTo(inData, dst);
+ if (transferred == 0 && isBlocking()) {
+ continue;
+ }
+ return transferred;
}
-
- @Override
- public boolean isOpen() {
- return socketChannel.isOpen();
+ }
+
+ /**
+ * {@link #read(ByteBuffer)} may not be to leave all buffers(inData, inCrypt)
+ **/
+ private int readRemaining(ByteBuffer dst) throws SSLException {
+ if (inData.hasRemaining()) {
+ return transfereTo(inData, dst);
}
-
- @Override
- public boolean isNeedWrite() {
- return outCrypt.hasRemaining() || !isHandShakeComplete(); // FIXME this condition can cause high cpu load during handshaking when network is slow
+ if (!inData.hasRemaining()) {
+ inData.clear();
}
-
- @Override
- public void writeMore() throws IOException {
- write( outCrypt );
+ tryRestoreCryptedData();
+ // test if some bytes left from last read (e.g. BUFFER_UNDERFLOW)
+ if (inCrypt.hasRemaining()) {
+ unwrap();
+ int amount = transfereTo(inData, dst);
+ if (readEngineResult.getStatus() == SSLEngineResult.Status.CLOSED) {
+ return -1;
+ }
+ if (amount > 0) {
+ return amount;
+ }
}
-
- @Override
- public boolean isNeedRead() {
- return saveCryptData != null || inData.hasRemaining() || ( inCrypt.hasRemaining() && readEngineResult.getStatus() != Status.BUFFER_UNDERFLOW && readEngineResult.getStatus() != Status.CLOSED );
+ return 0;
+ }
+
+ public boolean isConnected() {
+ return socketChannel.isConnected();
+ }
+
+ public void close() throws IOException {
+ sslEngine.closeOutbound();
+ sslEngine.getSession().invalidate();
+ if (socketChannel.isOpen()) {
+ socketChannel.write(wrap(emptybuffer));// FIXME what if not all bytes can be written
}
-
- @Override
- public int readMore( ByteBuffer dst ) throws SSLException {
- return readRemaining( dst );
+ socketChannel.close();
+ }
+
+ private boolean isHandShakeComplete() {
+ HandshakeStatus status = sslEngine.getHandshakeStatus();
+ return status == SSLEngineResult.HandshakeStatus.FINISHED
+ || status == SSLEngineResult.HandshakeStatus.NOT_HANDSHAKING;
+ }
+
+ public SelectableChannel configureBlocking(boolean b) throws IOException {
+ return socketChannel.configureBlocking(b);
+ }
+
+ public boolean connect(SocketAddress remote) throws IOException {
+ return socketChannel.connect(remote);
+ }
+
+ public boolean finishConnect() throws IOException {
+ return socketChannel.finishConnect();
+ }
+
+ public Socket socket() {
+ return socketChannel.socket();
+ }
+
+ public boolean isInboundDone() {
+ return sslEngine.isInboundDone();
+ }
+
+ @Override
+ public boolean isOpen() {
+ return socketChannel.isOpen();
+ }
+
+ @Override
+ public boolean isNeedWrite() {
+ return outCrypt.hasRemaining()
+ || !isHandShakeComplete(); // FIXME this condition can cause high cpu load during handshaking when network is slow
+ }
+
+ @Override
+ public void writeMore() throws IOException {
+ write(outCrypt);
+ }
+
+ @Override
+ public boolean isNeedRead() {
+ return saveCryptData != null || inData.hasRemaining() || (inCrypt.hasRemaining()
+ && readEngineResult.getStatus() != Status.BUFFER_UNDERFLOW
+ && readEngineResult.getStatus() != Status.CLOSED);
+ }
+
+ @Override
+ public int readMore(ByteBuffer dst) throws SSLException {
+ return readRemaining(dst);
+ }
+
+ private int transfereTo(ByteBuffer from, ByteBuffer to) {
+ int fremain = from.remaining();
+ int toremain = to.remaining();
+ if (fremain > toremain) {
+ // FIXME there should be a more efficient transfer method
+ int limit = Math.min(fremain, toremain);
+ for (int i = 0; i < limit; i++) {
+ to.put(from.get());
+ }
+ return limit;
+ } else {
+ to.put(from);
+ return fremain;
}
- private int transfereTo( ByteBuffer from, ByteBuffer to ) {
- int fremain = from.remaining();
- int toremain = to.remaining();
- if( fremain > toremain ) {
- // FIXME there should be a more efficient transfer method
- int limit = Math.min( fremain, toremain );
- for( int i = 0 ; i < limit ; i++ ) {
- to.put( from.get() );
- }
- return limit;
- } else {
- to.put( from );
- return fremain;
- }
+ }
- }
+ @Override
+ public boolean isBlocking() {
+ return socketChannel.isBlocking();
+ }
- @Override
- public boolean isBlocking() {
- return socketChannel.isBlocking();
- }
+ @Override
+ public SSLEngine getSSLEngine() {
+ return sslEngine;
+ }
- @Override
- public SSLEngine getSSLEngine() {
- return sslEngine;
- }
+ // to avoid complexities with inCrypt, extra unwrapped data after SSL handshake will be saved off in a byte array
+ // and the inserted back on first read
+ private byte[] saveCryptData = null;
- // to avoid complexities with inCrypt, extra unwrapped data after SSL handshake will be saved off in a byte array
- // and the inserted back on first read
- private byte[] saveCryptData = null;
- private void saveCryptedData()
- {
- // did we find any extra data?
- if (inCrypt != null && inCrypt.remaining() > 0)
- {
- int saveCryptSize = inCrypt.remaining();
- saveCryptData = new byte[saveCryptSize];
- inCrypt.get(saveCryptData);
- }
+ private void saveCryptedData() {
+ // did we find any extra data?
+ if (inCrypt != null && inCrypt.remaining() > 0) {
+ int saveCryptSize = inCrypt.remaining();
+ saveCryptData = new byte[saveCryptSize];
+ inCrypt.get(saveCryptData);
}
-
- private void tryRestoreCryptedData()
- {
- // was there any extra data, then put into inCrypt and clean up
- if ( saveCryptData != null )
- {
- inCrypt.clear();
- inCrypt.put( saveCryptData );
- inCrypt.flip();
- saveCryptData = null;
- }
+ }
+
+ private void tryRestoreCryptedData() {
+ // was there any extra data, then put into inCrypt and clean up
+ if (saveCryptData != null) {
+ inCrypt.clear();
+ inCrypt.put(saveCryptData);
+ inCrypt.flip();
+ saveCryptData = null;
}
+ }
}
\ No newline at end of file
diff --git a/src/main/java/org/java_websocket/SocketChannelIOHelper.java b/src/main/java/org/java_websocket/SocketChannelIOHelper.java
index ba1575288..14fb58b7c 100644
--- a/src/main/java/org/java_websocket/SocketChannelIOHelper.java
+++ b/src/main/java/org/java_websocket/SocketChannelIOHelper.java
@@ -33,77 +33,84 @@
public class SocketChannelIOHelper {
- private SocketChannelIOHelper() {
- throw new IllegalStateException("Utility class");
- }
+ private SocketChannelIOHelper() {
+ throw new IllegalStateException("Utility class");
+ }
- public static boolean read( final ByteBuffer buf, WebSocketImpl ws, ByteChannel channel ) throws IOException {
- buf.clear();
- int read = channel.read( buf );
- buf.flip();
+ public static boolean read(final ByteBuffer buf, WebSocketImpl ws, ByteChannel channel)
+ throws IOException {
+ buf.clear();
+ int read = channel.read(buf);
+ buf.flip();
- if( read == -1 ) {
- ws.eot();
- return false;
- }
- return read != 0;
- }
+ if (read == -1) {
+ ws.eot();
+ return false;
+ }
+ return read != 0;
+ }
- /**
- * @see WrappedByteChannel#readMore(ByteBuffer)
- * @param buf The ByteBuffer to read from
- * @param ws The WebSocketImpl associated with the channels
- * @param channel The channel to read from
- * @return returns Whether there is more data left which can be obtained via {@link WrappedByteChannel#readMore(ByteBuffer)}
- * @throws IOException May be thrown by {@link WrappedByteChannel#readMore(ByteBuffer)}#
- **/
- public static boolean readMore( final ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel ) throws IOException {
- buf.clear();
- int read = channel.readMore( buf );
- buf.flip();
+ /**
+ * @param buf The ByteBuffer to read from
+ * @param ws The WebSocketImpl associated with the channels
+ * @param channel The channel to read from
+ * @return returns Whether there is more data left which can be obtained via {@link
+ * WrappedByteChannel#readMore(ByteBuffer)}
+ * @throws IOException May be thrown by {@link WrappedByteChannel#readMore(ByteBuffer)}#
+ * @see WrappedByteChannel#readMore(ByteBuffer)
+ **/
+ public static boolean readMore(final ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel)
+ throws IOException {
+ buf.clear();
+ int read = channel.readMore(buf);
+ buf.flip();
- if( read == -1 ) {
- ws.eot();
- return false;
- }
- return channel.isNeedRead();
- }
+ if (read == -1) {
+ ws.eot();
+ return false;
+ }
+ return channel.isNeedRead();
+ }
- /** Returns whether the whole outQueue has been flushed
- * @param ws The WebSocketImpl associated with the channels
- * @param sockchannel The channel to write to
- * @throws IOException May be thrown by {@link WrappedByteChannel#writeMore()}
- * @return returns Whether there is more data to write
- */
- public static boolean batch( WebSocketImpl ws, ByteChannel sockchannel ) throws IOException {
- if (ws == null) {
- return false;
- }
- ByteBuffer buffer = ws.outQueue.peek();
- WrappedByteChannel c = null;
+ /**
+ * Returns whether the whole outQueue has been flushed
+ *
+ * @param ws The WebSocketImpl associated with the channels
+ * @param sockchannel The channel to write to
+ * @return returns Whether there is more data to write
+ * @throws IOException May be thrown by {@link WrappedByteChannel#writeMore()}
+ */
+ public static boolean batch(WebSocketImpl ws, ByteChannel sockchannel) throws IOException {
+ if (ws == null) {
+ return false;
+ }
+ ByteBuffer buffer = ws.outQueue.peek();
+ WrappedByteChannel c = null;
- if( buffer == null ) {
- if( sockchannel instanceof WrappedByteChannel ) {
- c = (WrappedByteChannel) sockchannel;
- if( c.isNeedWrite() ) {
- c.writeMore();
- }
- }
- } else {
- do {// FIXME writing as much as possible is unfair!!
- /*int written = */sockchannel.write( buffer );
- if( buffer.remaining() > 0 ) {
- return false;
- } else {
- ws.outQueue.poll(); // Buffer finished. Remove it.
- buffer = ws.outQueue.peek();
- }
- } while ( buffer != null );
- }
+ if (buffer == null) {
+ if (sockchannel instanceof WrappedByteChannel) {
+ c = (WrappedByteChannel) sockchannel;
+ if (c.isNeedWrite()) {
+ c.writeMore();
+ }
+ }
+ } else {
+ do {// FIXME writing as much as possible is unfair!!
+ /*int written = */
+ sockchannel.write(buffer);
+ if (buffer.remaining() > 0) {
+ return false;
+ } else {
+ ws.outQueue.poll(); // Buffer finished. Remove it.
+ buffer = ws.outQueue.peek();
+ }
+ } while (buffer != null);
+ }
- if( ws.outQueue.isEmpty() && ws.isFlushAndClose() && ws.getDraft() != null && ws.getDraft().getRole() != null && ws.getDraft().getRole() == Role.SERVER ) {//
- ws.closeConnection();
- }
- return c == null || !((WrappedByteChannel) sockchannel).isNeedWrite();
- }
+ if (ws.outQueue.isEmpty() && ws.isFlushAndClose() && ws.getDraft() != null
+ && ws.getDraft().getRole() != null && ws.getDraft().getRole() == Role.SERVER) {//
+ ws.closeConnection();
+ }
+ return c == null || !((WrappedByteChannel) sockchannel).isNeedWrite();
+ }
}
diff --git a/src/main/java/org/java_websocket/WebSocket.java b/src/main/java/org/java_websocket/WebSocket.java
index 652d45359..3c23b8c20 100644
--- a/src/main/java/org/java_websocket/WebSocket.java
+++ b/src/main/java/org/java_websocket/WebSocket.java
@@ -40,197 +40,213 @@
public interface WebSocket {
- /**
- * sends the closing handshake.
- * may be send in response to an other handshake.
- * @param code the closing code
- * @param message the closing message
- */
- void close( int code, String message );
-
- /**
- * sends the closing handshake.
- * may be send in response to an other handshake.
- * @param code the closing code
- */
- void close( int code );
-
- /** Convenience function which behaves like close(CloseFrame.NORMAL) */
- void close();
-
- /**
- * This will close the connection immediately without a proper close handshake.
- * The code and the message therefore won't be transferred over the wire also they will be forwarded to onClose/onWebsocketClose.
- * @param code the closing code
- * @param message the closing message
- **/
- void closeConnection( int code, String message );
-
- /**
- * Send Text data to the other end.
- *
- * @param text the text data to send
- * @throws WebsocketNotConnectedException websocket is not yet connected
- */
- void send( String text );
-
- /**
- * Send Binary data (plain bytes) to the other end.
- *
- * @param bytes the binary data to send
- * @throws IllegalArgumentException the data is null
- * @throws WebsocketNotConnectedException websocket is not yet connected
- */
- void send( ByteBuffer bytes );
-
- /**
- * Send Binary data (plain bytes) to the other end.
- *
- * @param bytes the byte array to send
- * @throws IllegalArgumentException the data is null
- * @throws WebsocketNotConnectedException websocket is not yet connected
- */
- void send( byte[] bytes );
-
- /**
- * Send a frame to the other end
- * @param framedata the frame to send to the other end
- */
- void sendFrame( Framedata framedata );
-
- /**
- * Send a collection of frames to the other end
- * @param frames the frames to send to the other end
- */
- void sendFrame( Collection
- * For more into on this frame type see http://tools.ietf.org/html/rfc6455#section-5.4
- *
- * If the first frame you send is also the last then it is not a fragmented frame and will received via onMessage instead of onFragmented even though it was send by this method.
- *
- * @param op
- * This is only important for the first frame in the sequence. Opcode.TEXT, Opcode.BINARY are allowed.
- * @param buffer
- * The buffer which contains the payload. It may have no bytes remaining.
- * @param fin
- * true means the current frame is the last in the sequence.
- **/
- void sendFragmentedFrame( Opcode op, ByteBuffer buffer, boolean fin );
-
- /**
- * Checks if the websocket has buffered data
- * @return has the websocket buffered data
- */
- boolean hasBufferedData();
-
- /**
- * Returns the address of the endpoint this socket is connected to, or{@code null} if it is unconnected.
- *
- * @return never returns null
- */
- InetSocketAddress getRemoteSocketAddress();
-
- /**
- * Returns the address of the endpoint this socket is bound to.
- *
- * @return never returns null
- */
- InetSocketAddress getLocalSocketAddress();
-
- /**
- * Is the websocket in the state OPEN
- * @return state equals ReadyState.OPEN
- */
- boolean isOpen();
-
- /**
- * Is the websocket in the state CLOSING
- * @return state equals ReadyState.CLOSING
- */
- boolean isClosing();
-
- /**
- * Returns true when no further frames may be submitted
- * This happens before the socket connection is closed.
- * @return true when no further frames may be submitted
- */
- boolean isFlushAndClose();
-
- /**
- * Is the websocket in the state CLOSED
- * @return state equals ReadyState.CLOSED
- */
- boolean isClosed();
-
- /**
- * Getter for the draft
- * @return the used draft
- */
- Draft getDraft();
-
- /**
- * Retrieve the WebSocket 'ReadyState'.
- * This represents the state of the connection.
- * It returns a numerical value, as per W3C WebSockets specs.
- *
- * @return Returns '0 = CONNECTING', '1 = OPEN', '2 = CLOSING' or '3 = CLOSED'
- */
- ReadyState getReadyState();
-
- /**
- * Returns the HTTP Request-URI as defined by http://tools.ietf.org/html/rfc2616#section-5.1.2
- * If the opening handshake has not yet happened it will return null.
- * @return Returns the decoded path component of this URI.
- **/
- String getResourceDescriptor();
-
- /**
- * Setter for an attachment on the socket connection.
- * The attachment may be of any type.
- *
- * @param attachment The object to be attached to the user
- * @param
For more into on this frame type
+ * see http://tools.ietf.org/html/rfc6455#section-5.4
+ *
This happens before the socket
+ * connection is closed.
+ *
+ * @return true when no further frames may be submitted
+ */
+ boolean isFlushAndClose();
+
+ /**
+ * Is the websocket in the state CLOSED
+ *
+ * @return state equals ReadyState.CLOSED
+ */
+ boolean isClosed();
+
+ /**
+ * Getter for the draft
+ *
+ * @return the used draft
+ */
+ Draft getDraft();
+
+ /**
+ * Retrieve the WebSocket 'ReadyState'. This represents the state of the connection. It returns a
+ * numerical value, as per W3C WebSockets specs.
+ *
+ * @return Returns '0 = CONNECTING', '1 = OPEN', '2 = CLOSING' or '3 = CLOSED'
+ */
+ ReadyState getReadyState();
+
+ /**
+ * Returns the HTTP Request-URI as defined by http://tools.ietf.org/html/rfc2616#section-5.1.2
+ * If the opening handshake has not yet happened it will return null.
+ *
+ * @return Returns the decoded path component of this URI.
+ **/
+ String getResourceDescriptor();
+
+ /**
+ * Setter for an attachment on the socket connection. The attachment may be of any type.
+ *
+ * @param attachment The object to be attached to the user
+ * @param
+ * This class default implements all methods of the WebSocketListener that can be overridden
+ * optionally when advances functionalities is needed.
**/
public abstract class WebSocketAdapter implements WebSocketListener {
- private PingFrame pingFrame;
+ private PingFrame pingFrame;
- /**
- * This default implementation does not do anything. Go ahead and overwrite it.
- *
- * @see org.java_websocket.WebSocketListener#onWebsocketHandshakeReceivedAsServer(WebSocket, Draft, ClientHandshake)
- */
- @Override
- public ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer( WebSocket conn, Draft draft, ClientHandshake request ) throws InvalidDataException {
- return new HandshakeImpl1Server();
- }
+ /**
+ * This default implementation does not do anything. Go ahead and overwrite it.
+ *
+ * @see org.java_websocket.WebSocketListener#onWebsocketHandshakeReceivedAsServer(WebSocket,
+ * Draft, ClientHandshake)
+ */
+ @Override
+ public ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer(WebSocket conn, Draft draft,
+ ClientHandshake request) throws InvalidDataException {
+ return new HandshakeImpl1Server();
+ }
- @Override
- public void onWebsocketHandshakeReceivedAsClient( WebSocket conn, ClientHandshake request, ServerHandshake response ) throws InvalidDataException {
- //To overwrite
- }
+ @Override
+ public void onWebsocketHandshakeReceivedAsClient(WebSocket conn, ClientHandshake request,
+ ServerHandshake response) throws InvalidDataException {
+ //To overwrite
+ }
- /**
- * This default implementation does not do anything which will cause the connections to always progress.
- *
- * @see org.java_websocket.WebSocketListener#onWebsocketHandshakeSentAsClient(WebSocket, ClientHandshake)
- */
- @Override
- public void onWebsocketHandshakeSentAsClient( WebSocket conn, ClientHandshake request ) throws InvalidDataException {
- //To overwrite
- }
+ /**
+ * This default implementation does not do anything which will cause the connections to always
+ * progress.
+ *
+ * @see org.java_websocket.WebSocketListener#onWebsocketHandshakeSentAsClient(WebSocket,
+ * ClientHandshake)
+ */
+ @Override
+ public void onWebsocketHandshakeSentAsClient(WebSocket conn, ClientHandshake request)
+ throws InvalidDataException {
+ //To overwrite
+ }
- /**
- * This default implementation will send a pong in response to the received ping.
- * The pong frame will have the same payload as the ping frame.
- *
- * @see org.java_websocket.WebSocketListener#onWebsocketPing(WebSocket, Framedata)
- */
- @Override
- public void onWebsocketPing( WebSocket conn, Framedata f ) {
- conn.sendFrame( new PongFrame( (PingFrame)f ) );
- }
+ /**
+ * This default implementation will send a pong in response to the received ping. The pong frame
+ * will have the same payload as the ping frame.
+ *
+ * @see org.java_websocket.WebSocketListener#onWebsocketPing(WebSocket, Framedata)
+ */
+ @Override
+ public void onWebsocketPing(WebSocket conn, Framedata f) {
+ conn.sendFrame(new PongFrame((PingFrame) f));
+ }
- /**
- * This default implementation does not do anything. Go ahead and overwrite it.
- *
- * @see org.java_websocket.WebSocketListener#onWebsocketPong(WebSocket, Framedata)
- */
- @Override
- public void onWebsocketPong( WebSocket conn, Framedata f ) {
- //To overwrite
- }
+ /**
+ * This default implementation does not do anything. Go ahead and overwrite it.
+ *
+ * @see org.java_websocket.WebSocketListener#onWebsocketPong(WebSocket, Framedata)
+ */
+ @Override
+ public void onWebsocketPong(WebSocket conn, Framedata f) {
+ //To overwrite
+ }
- /**
- * Default implementation for onPreparePing, returns a (cached) PingFrame that has no application data.
- * @see org.java_websocket.WebSocketListener#onPreparePing(WebSocket)
- *
- * @param conn The WebSocket connection from which the ping frame will be sent.
- * @return PingFrame to be sent.
- */
- @Override
- public PingFrame onPreparePing(WebSocket conn) {
- if(pingFrame == null)
- pingFrame = new PingFrame();
- return pingFrame;
- }
+ /**
+ * Default implementation for onPreparePing, returns a (cached) PingFrame that has no application
+ * data.
+ *
+ * @param conn The WebSocket connection from which the ping frame will be sent.
+ * @return PingFrame to be sent.
+ * @see org.java_websocket.WebSocketListener#onPreparePing(WebSocket)
+ */
+ @Override
+ public PingFrame onPreparePing(WebSocket conn) {
+ if (pingFrame == null) {
+ pingFrame = new PingFrame();
+ }
+ return pingFrame;
+ }
}
diff --git a/src/main/java/org/java_websocket/WebSocketFactory.java b/src/main/java/org/java_websocket/WebSocketFactory.java
index 8a2bcc022..65de7c550 100644
--- a/src/main/java/org/java_websocket/WebSocketFactory.java
+++ b/src/main/java/org/java_websocket/WebSocketFactory.java
@@ -30,20 +30,23 @@
import org.java_websocket.drafts.Draft;
public interface WebSocketFactory {
- /**
- * Create a new Websocket with the provided listener, drafts and socket
- * @param a The Listener for the WebsocketImpl
- * @param d The draft which should be used
- * @return A WebsocketImpl
- */
- WebSocket createWebSocket( WebSocketAdapter a, Draft d);
- /**
- * Create a new Websocket with the provided listener, drafts and socket
- * @param a The Listener for the WebsocketImpl
- * @param drafts The drafts which should be used
- * @return A WebsocketImpl
- */
- WebSocket createWebSocket( WebSocketAdapter a, List" + errorCodeDescription + "
" ) );
- }
-
- public synchronized void close( int code, String message, boolean remote ) {
- if( readyState != ReadyState.CLOSING && readyState != ReadyState.CLOSED ) {
- if( readyState == ReadyState.OPEN ) {
- if( code == CloseFrame.ABNORMAL_CLOSE ) {
- assert ( !remote );
- readyState = ReadyState.CLOSING ;
- flushAndClose( code, message, false );
- return;
- }
- if( draft.getCloseHandshakeType() != CloseHandshakeType.NONE ) {
- try {
- if( !remote ) {
- try {
- wsl.onWebsocketCloseInitiated( this, code, message );
- } catch ( RuntimeException e ) {
- wsl.onWebsocketError( this, e );
- }
- }
- if( isOpen() ) {
- CloseFrame closeFrame = new CloseFrame();
- closeFrame.setReason( message );
- closeFrame.setCode( code );
- closeFrame.isValid();
- sendFrame( closeFrame );
- }
- } catch ( InvalidDataException e ) {
- log.error("generated frame is invalid", e);
- wsl.onWebsocketError( this, e );
- flushAndClose( CloseFrame.ABNORMAL_CLOSE, "generated frame is invalid", false );
- }
- }
- flushAndClose( code, message, remote );
- } else if( code == CloseFrame.FLASHPOLICY ) {
- assert ( remote );
- flushAndClose( CloseFrame.FLASHPOLICY, message, true );
- } else if( code == CloseFrame.PROTOCOL_ERROR ) { // this endpoint found a PROTOCOL_ERROR
- flushAndClose( code, message, remote );
- } else {
- flushAndClose( CloseFrame.NEVER_CONNECTED, message, false );
- }
- readyState = ReadyState.CLOSING;
- tmpHandshakeBytes = null;
- return;
- }
- }
-
- @Override
- public void close( int code, String message ) {
- close( code, message, false );
- }
-
- /**
- * This will close the connection immediately without a proper close handshake.
- * The code and the message therefore won't be transferred over the wire also they will be forwarded to onClose/onWebsocketClose.
- *
- * @param code the closing code
- * @param message the closing message
- * @param remote Indicates who "generated" code.
- * true means that this endpoint received the code from the other endpoint.
- * false means this endpoint decided to send the given code,
- * remote may also be true if this endpoint started the closing handshake since the other endpoint may not simply echo the code but close the connection the same time this endpoint does do but with an other code.
- **/
- public synchronized void closeConnection( int code, String message, boolean remote ) {
- if( readyState == ReadyState.CLOSED ) {
- return;
- }
- //Methods like eot() call this method without calling onClose(). Due to that reason we have to adjust the ReadyState manually
- if( readyState == ReadyState.OPEN ) {
- if( code == CloseFrame.ABNORMAL_CLOSE ) {
- readyState = ReadyState.CLOSING;
- }
- }
- if( key != null ) {
- // key.attach( null ); //see issue #114
- key.cancel();
- }
- if( channel != null ) {
- try {
- channel.close();
- } catch ( IOException e ) {
- if( e.getMessage() != null && e.getMessage().equals( "Broken pipe" ) ) {
- log.trace( "Caught IOException: Broken pipe during closeConnection()", e );
- } else {
- log.error("Exception during channel.close()", e);
- wsl.onWebsocketError( this, e );
- }
- }
- }
- try {
- this.wsl.onWebsocketClose( this, code, message, remote );
- } catch ( RuntimeException e ) {
-
- wsl.onWebsocketError( this, e );
- }
- if( draft != null )
- draft.reset();
- handshakerequest = null;
- readyState = ReadyState.CLOSED;
- }
-
- protected void closeConnection( int code, boolean remote ) {
- closeConnection( code, "", remote );
- }
-
- public void closeConnection() {
- if( closedremotely == null ) {
- throw new IllegalStateException( "this method must be used in conjunction with flushAndClose" );
- }
- closeConnection( closecode, closemessage, closedremotely );
- }
-
- public void closeConnection( int code, String message ) {
- closeConnection( code, message, false );
- }
-
- public synchronized void flushAndClose( int code, String message, boolean remote ) {
- if( flushandclosestate ) {
- return;
- }
- closecode = code;
- closemessage = message;
- closedremotely = remote;
-
- flushandclosestate = true;
-
- wsl.onWriteDemand( this ); // ensures that all outgoing frames are flushed before closing the connection
- try {
- wsl.onWebsocketClosing( this, code, message, remote );
- } catch ( RuntimeException e ) {
- log.error("Exception in onWebsocketClosing", e);
- wsl.onWebsocketError( this, e );
- }
- if( draft != null )
- draft.reset();
- handshakerequest = null;
- }
-
- public void eot() {
- if( readyState == ReadyState.NOT_YET_CONNECTED ) {
- closeConnection( CloseFrame.NEVER_CONNECTED, true );
- } else if( flushandclosestate ) {
- closeConnection( closecode, closemessage, closedremotely );
- } else if( draft.getCloseHandshakeType() == CloseHandshakeType.NONE ) {
- closeConnection( CloseFrame.NORMAL, true );
- } else if( draft.getCloseHandshakeType() == CloseHandshakeType.ONEWAY ) {
- if( role == Role.SERVER )
- closeConnection( CloseFrame.ABNORMAL_CLOSE, true );
- else
- closeConnection( CloseFrame.NORMAL, true );
- } else {
- closeConnection( CloseFrame.ABNORMAL_CLOSE, true );
- }
- }
-
- @Override
- public void close( int code ) {
- close( code, "", false );
- }
-
- public void close( InvalidDataException e ) {
- close( e.getCloseCode(), e.getMessage(), false );
- }
-
- /**
- * Send Text data to the other end.
- *
- * @throws WebsocketNotConnectedException websocket is not yet connected
- */
- @Override
- public void send( String text ) {
- if( text == null )
- throw new IllegalArgumentException( "Cannot send 'null' data to a WebSocketImpl." );
- send( draft.createFrames( text, role == Role.CLIENT ) );
- }
-
- /**
- * Send Binary data (plain bytes) to the other end.
- *
- * @throws IllegalArgumentException the data is null
- * @throws WebsocketNotConnectedException websocket is not yet connected
- */
- @Override
- public void send( ByteBuffer bytes ) {
- if( bytes == null )
- throw new IllegalArgumentException( "Cannot send 'null' data to a WebSocketImpl." );
- send( draft.createFrames( bytes, role == Role.CLIENT ) );
- }
-
- @Override
- public void send( byte[] bytes ) {
- send( ByteBuffer.wrap( bytes ) );
- }
-
- private void send( Collection"
+ + errorCodeDescription + "
"));
+ }
+
+ public synchronized void close(int code, String message, boolean remote) {
+ if (readyState != ReadyState.CLOSING && readyState != ReadyState.CLOSED) {
+ if (readyState == ReadyState.OPEN) {
+ if (code == CloseFrame.ABNORMAL_CLOSE) {
+ assert (!remote);
+ readyState = ReadyState.CLOSING;
+ flushAndClose(code, message, false);
+ return;
+ }
+ if (draft.getCloseHandshakeType() != CloseHandshakeType.NONE) {
+ try {
+ if (!remote) {
+ try {
+ wsl.onWebsocketCloseInitiated(this, code, message);
+ } catch (RuntimeException e) {
+ wsl.onWebsocketError(this, e);
+ }
+ }
+ if (isOpen()) {
+ CloseFrame closeFrame = new CloseFrame();
+ closeFrame.setReason(message);
+ closeFrame.setCode(code);
+ closeFrame.isValid();
+ sendFrame(closeFrame);
+ }
+ } catch (InvalidDataException e) {
+ log.error("generated frame is invalid", e);
+ wsl.onWebsocketError(this, e);
+ flushAndClose(CloseFrame.ABNORMAL_CLOSE, "generated frame is invalid", false);
+ }
+ }
+ flushAndClose(code, message, remote);
+ } else if (code == CloseFrame.FLASHPOLICY) {
+ assert (remote);
+ flushAndClose(CloseFrame.FLASHPOLICY, message, true);
+ } else if (code == CloseFrame.PROTOCOL_ERROR) { // this endpoint found a PROTOCOL_ERROR
+ flushAndClose(code, message, remote);
+ } else {
+ flushAndClose(CloseFrame.NEVER_CONNECTED, message, false);
+ }
+ readyState = ReadyState.CLOSING;
+ tmpHandshakeBytes = null;
+ return;
+ }
+ }
+
+ @Override
+ public void close(int code, String message) {
+ close(code, message, false);
+ }
+
+ /**
+ * This will close the connection immediately without a proper close handshake. The code and the
+ * message therefore won't be transferred over the wire also they will be forwarded to
+ * onClose/onWebsocketClose.
+ *
+ * @param code the closing code
+ * @param message the closing message
+ * @param remote Indicates who "generated" code.
+ * true means that this endpoint received the code from
+ * the other endpoint.
+ * false means this endpoint decided to send the given code,
+ * remote may also be true if this endpoint started the closing
+ * handshake since the other endpoint may not simply echo the code but
+ * close the connection the same time this endpoint does do but with an other
+ * code.
+ **/
+ public synchronized void closeConnection(int code, String message, boolean remote) {
+ if (readyState == ReadyState.CLOSED) {
+ return;
+ }
+ //Methods like eot() call this method without calling onClose(). Due to that reason we have to adjust the ReadyState manually
+ if (readyState == ReadyState.OPEN) {
+ if (code == CloseFrame.ABNORMAL_CLOSE) {
+ readyState = ReadyState.CLOSING;
+ }
+ }
+ if (key != null) {
+ // key.attach( null ); //see issue #114
+ key.cancel();
+ }
+ if (channel != null) {
+ try {
+ channel.close();
+ } catch (IOException e) {
+ if (e.getMessage() != null && e.getMessage().equals("Broken pipe")) {
+ log.trace("Caught IOException: Broken pipe during closeConnection()", e);
+ } else {
+ log.error("Exception during channel.close()", e);
+ wsl.onWebsocketError(this, e);
+ }
+ }
+ }
+ try {
+ this.wsl.onWebsocketClose(this, code, message, remote);
+ } catch (RuntimeException e) {
+
+ wsl.onWebsocketError(this, e);
+ }
+ if (draft != null) {
+ draft.reset();
+ }
+ handshakerequest = null;
+ readyState = ReadyState.CLOSED;
+ }
+
+ protected void closeConnection(int code, boolean remote) {
+ closeConnection(code, "", remote);
+ }
+
+ public void closeConnection() {
+ if (closedremotely == null) {
+ throw new IllegalStateException("this method must be used in conjunction with flushAndClose");
+ }
+ closeConnection(closecode, closemessage, closedremotely);
+ }
+
+ public void closeConnection(int code, String message) {
+ closeConnection(code, message, false);
+ }
+
+ public synchronized void flushAndClose(int code, String message, boolean remote) {
+ if (flushandclosestate) {
+ return;
+ }
+ closecode = code;
+ closemessage = message;
+ closedremotely = remote;
+
+ flushandclosestate = true;
+
+ wsl.onWriteDemand(
+ this); // ensures that all outgoing frames are flushed before closing the connection
+ try {
+ wsl.onWebsocketClosing(this, code, message, remote);
+ } catch (RuntimeException e) {
+ log.error("Exception in onWebsocketClosing", e);
+ wsl.onWebsocketError(this, e);
+ }
+ if (draft != null) {
+ draft.reset();
+ }
+ handshakerequest = null;
+ }
+
+ public void eot() {
+ if (readyState == ReadyState.NOT_YET_CONNECTED) {
+ closeConnection(CloseFrame.NEVER_CONNECTED, true);
+ } else if (flushandclosestate) {
+ closeConnection(closecode, closemessage, closedremotely);
+ } else if (draft.getCloseHandshakeType() == CloseHandshakeType.NONE) {
+ closeConnection(CloseFrame.NORMAL, true);
+ } else if (draft.getCloseHandshakeType() == CloseHandshakeType.ONEWAY) {
+ if (role == Role.SERVER) {
+ closeConnection(CloseFrame.ABNORMAL_CLOSE, true);
+ } else {
+ closeConnection(CloseFrame.NORMAL, true);
+ }
+ } else {
+ closeConnection(CloseFrame.ABNORMAL_CLOSE, true);
+ }
+ }
+
+ @Override
+ public void close(int code) {
+ close(code, "", false);
+ }
+
+ public void close(InvalidDataException e) {
+ close(e.getCloseCode(), e.getMessage(), false);
+ }
+
+ /**
+ * Send Text data to the other end.
+ *
+ * @throws WebsocketNotConnectedException websocket is not yet connected
+ */
+ @Override
+ public void send(String text) {
+ if (text == null) {
+ throw new IllegalArgumentException("Cannot send 'null' data to a WebSocketImpl.");
+ }
+ send(draft.createFrames(text, role == Role.CLIENT));
+ }
+
+ /**
+ * Send Binary data (plain bytes) to the other end.
+ *
+ * @throws IllegalArgumentException the data is null
+ * @throws WebsocketNotConnectedException websocket is not yet connected
+ */
+ @Override
+ public void send(ByteBuffer bytes) {
+ if (bytes == null) {
+ throw new IllegalArgumentException("Cannot send 'null' data to a WebSocketImpl.");
+ }
+ send(draft.createFrames(bytes, role == Role.CLIENT));
+ }
+
+ @Override
+ public void send(byte[] bytes) {
+ send(ByteBuffer.wrap(bytes));
+ }
+
+ private void send(Collection
- * By default this method only requires protocol compliance.
- *
- * @param conn
- * The WebSocket related to this event
- * @param draft
- * The protocol draft the client uses to connect
- * @param request
- * The opening http message send by the client. Can be used to access additional fields like cookies.
- * @return Returns an incomplete handshake containing all optional fields
- * @throws InvalidDataException
- * Throwing this exception will cause this handshake to be rejected
- */
- ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer( WebSocket conn, Draft draft, ClientHandshake request ) throws InvalidDataException;
-
- /**
- * Called on the client side when the socket connection is first established, and the WebSocketImpl
- * handshake response has been received.
- *
- * @param conn
- * The WebSocket related to this event
- * @param request
- * The handshake initially send out to the server by this websocket.
- * @param response
- * The handshake the server sent in response to the request.
- * @throws InvalidDataException
- * Allows the client to reject the connection with the server in respect of its handshake response.
- */
- void onWebsocketHandshakeReceivedAsClient( WebSocket conn, ClientHandshake request, ServerHandshake response ) throws InvalidDataException;
-
- /**
- * Called on the client side when the socket connection is first established, and the WebSocketImpl
- * handshake has just been sent.
- *
- * @param conn
- * The WebSocket related to this event
- * @param request
- * The handshake sent to the server by this websocket
- * @throws InvalidDataException
- * Allows the client to stop the connection from progressing
- */
- void onWebsocketHandshakeSentAsClient( WebSocket conn, ClientHandshake request ) throws InvalidDataException;
-
- /**
- * Called when an entire text frame has been received. Do whatever you want
- * here...
- *
- * @param conn
- * The WebSocket instance this event is occurring on.
- * @param message
- * The UTF-8 decoded message that was received.
- */
- void onWebsocketMessage( WebSocket conn, String message );
-
- /**
- * Called when an entire binary frame has been received. Do whatever you want
- * here...
- *
- * @param conn
- * The WebSocket instance this event is occurring on.
- * @param blob
- * The binary message that was received.
- */
- void onWebsocketMessage( WebSocket conn, ByteBuffer blob );
-
- /**
- * Called after onHandshakeReceived returns true.
- * Indicates that a complete WebSocket connection has been established,
- * and we are ready to send/receive data.
- *
- * @param conn The WebSocket instance this event is occurring on.
- * @param d The handshake of the websocket instance
- */
- void onWebsocketOpen( WebSocket conn, Handshakedata d );
-
- /**
- * Called after WebSocket#close is explicity called, or when the
- * other end of the WebSocket connection is closed.
- *
- * @param ws The WebSocket instance this event is occurring on.
- * @param code The codes can be looked up here: {@link CloseFrame}
- * @param reason Additional information string
- * @param remote Returns whether or not the closing of the connection was initiated by the remote host.
- */
- void onWebsocketClose( WebSocket ws, int code, String reason, boolean remote );
-
- /** Called as soon as no further frames are accepted
- *
- * @param ws The WebSocket instance this event is occurring on.
- * @param code The codes can be looked up here: {@link CloseFrame}
- * @param reason Additional information string
- * @param remote Returns whether or not the closing of the connection was initiated by the remote host.
- */
- void onWebsocketClosing( WebSocket ws, int code, String reason, boolean remote );
-
- /** send when this peer sends a close handshake
- *
- * @param ws The WebSocket instance this event is occurring on.
- * @param code The codes can be looked up here: {@link CloseFrame}
- * @param reason Additional information string
- */
- void onWebsocketCloseInitiated( WebSocket ws, int code, String reason );
-
- /**
- * Called if an exception worth noting occurred.
- * If an error causes the connection to fail onClose will be called additionally afterwards.
- *
- * @param conn The WebSocket instance this event is occurring on.
- * @param ex
- * The exception that occurred.
- * Might be null if the exception is not related to any specific connection. For example if the server port could not be bound.
- */
- void onWebsocketError( WebSocket conn, Exception ex );
-
- /**
- * Called a ping frame has been received.
- * This method must send a corresponding pong by itself.
- *
- * @param conn The WebSocket instance this event is occurring on.
- * @param f The ping frame. Control frames may contain payload.
- */
- void onWebsocketPing( WebSocket conn, Framedata f );
-
- /**
- * Called just before a ping frame is sent, in order to allow users to customize their ping frame data.
- *
- * @param conn The WebSocket connection from which the ping frame will be sent.
- * @return PingFrame to be sent.
- */
- PingFrame onPreparePing(WebSocket conn );
-
- /**
- * Called when a pong frame is received.
- *
- * @param conn The WebSocket instance this event is occurring on.
- * @param f The pong frame. Control frames may contain payload.
- **/
- void onWebsocketPong( WebSocket conn, Framedata f );
-
- /** This method is used to inform the selector thread that there is data queued to be written to the socket.
- * @param conn The WebSocket instance this event is occurring on.
- */
- void onWriteDemand( WebSocket conn );
-
- /**
- * @see WebSocket#getLocalSocketAddress()
- *
- * @param conn The WebSocket instance this event is occurring on.
- * @return Returns the address of the endpoint this socket is bound to.
- */
- InetSocketAddress getLocalSocketAddress( WebSocket conn );
-
- /**
- * @see WebSocket#getRemoteSocketAddress()
- *
- * @param conn The WebSocket instance this event is occurring on.
- * @return Returns the address of the endpoint this socket is connected to, or{@code null} if it is unconnected.
- */
- InetSocketAddress getRemoteSocketAddress( WebSocket conn );
+ /**
+ * Called on the server side when the socket connection is first established, and the WebSocket
+ * handshake has been received. This method allows to deny connections based on the received
+ * handshake.
By default this method only requires protocol compliance.
+ *
+ * @param conn The WebSocket related to this event
+ * @param draft The protocol draft the client uses to connect
+ * @param request The opening http message send by the client. Can be used to access additional
+ * fields like cookies.
+ * @return Returns an incomplete handshake containing all optional fields
+ * @throws InvalidDataException Throwing this exception will cause this handshake to be rejected
+ */
+ ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer(WebSocket conn, Draft draft,
+ ClientHandshake request) throws InvalidDataException;
+
+ /**
+ * Called on the client side when the socket connection is first established, and the
+ * WebSocketImpl handshake response has been received.
+ *
+ * @param conn The WebSocket related to this event
+ * @param request The handshake initially send out to the server by this websocket.
+ * @param response The handshake the server sent in response to the request.
+ * @throws InvalidDataException Allows the client to reject the connection with the server in
+ * respect of its handshake response.
+ */
+ void onWebsocketHandshakeReceivedAsClient(WebSocket conn, ClientHandshake request,
+ ServerHandshake response) throws InvalidDataException;
+
+ /**
+ * Called on the client side when the socket connection is first established, and the
+ * WebSocketImpl handshake has just been sent.
+ *
+ * @param conn The WebSocket related to this event
+ * @param request The handshake sent to the server by this websocket
+ * @throws InvalidDataException Allows the client to stop the connection from progressing
+ */
+ void onWebsocketHandshakeSentAsClient(WebSocket conn, ClientHandshake request)
+ throws InvalidDataException;
+
+ /**
+ * Called when an entire text frame has been received. Do whatever you want here...
+ *
+ * @param conn The WebSocket instance this event is occurring on.
+ * @param message The UTF-8 decoded message that was received.
+ */
+ void onWebsocketMessage(WebSocket conn, String message);
+
+ /**
+ * Called when an entire binary frame has been received. Do whatever you want here...
+ *
+ * @param conn The WebSocket instance this event is occurring on.
+ * @param blob The binary message that was received.
+ */
+ void onWebsocketMessage(WebSocket conn, ByteBuffer blob);
+
+ /**
+ * Called after onHandshakeReceived returns true. Indicates that a complete
+ * WebSocket connection has been established, and we are ready to send/receive data.
+ *
+ * @param conn The WebSocket instance this event is occurring on.
+ * @param d The handshake of the websocket instance
+ */
+ void onWebsocketOpen(WebSocket conn, Handshakedata d);
+
+ /**
+ * Called after WebSocket#close is explicity called, or when the other end of the
+ * WebSocket connection is closed.
+ *
+ * @param ws The WebSocket instance this event is occurring on.
+ * @param code The codes can be looked up here: {@link CloseFrame}
+ * @param reason Additional information string
+ * @param remote Returns whether or not the closing of the connection was initiated by the remote
+ * host.
+ */
+ void onWebsocketClose(WebSocket ws, int code, String reason, boolean remote);
+
+ /**
+ * Called as soon as no further frames are accepted
+ *
+ * @param ws The WebSocket instance this event is occurring on.
+ * @param code The codes can be looked up here: {@link CloseFrame}
+ * @param reason Additional information string
+ * @param remote Returns whether or not the closing of the connection was initiated by the remote
+ * host.
+ */
+ void onWebsocketClosing(WebSocket ws, int code, String reason, boolean remote);
+
+ /**
+ * send when this peer sends a close handshake
+ *
+ * @param ws The WebSocket instance this event is occurring on.
+ * @param code The codes can be looked up here: {@link CloseFrame}
+ * @param reason Additional information string
+ */
+ void onWebsocketCloseInitiated(WebSocket ws, int code, String reason);
+
+ /**
+ * Called if an exception worth noting occurred. If an error causes the connection to fail onClose
+ * will be called additionally afterwards.
+ *
+ * @param conn The WebSocket instance this event is occurring on.
+ * @param ex The exception that occurred.
Might be null if the exception is not related to
+ * any specific connection. For example if the server port could not be bound.
+ */
+ void onWebsocketError(WebSocket conn, Exception ex);
+
+ /**
+ * Called a ping frame has been received. This method must send a corresponding pong by itself.
+ *
+ * @param conn The WebSocket instance this event is occurring on.
+ * @param f The ping frame. Control frames may contain payload.
+ */
+ void onWebsocketPing(WebSocket conn, Framedata f);
+
+ /**
+ * Called just before a ping frame is sent, in order to allow users to customize their ping frame
+ * data.
+ *
+ * @param conn The WebSocket connection from which the ping frame will be sent.
+ * @return PingFrame to be sent.
+ */
+ PingFrame onPreparePing(WebSocket conn);
+
+ /**
+ * Called when a pong frame is received.
+ *
+ * @param conn The WebSocket instance this event is occurring on.
+ * @param f The pong frame. Control frames may contain payload.
+ **/
+ void onWebsocketPong(WebSocket conn, Framedata f);
+
+ /**
+ * This method is used to inform the selector thread that there is data queued to be written to
+ * the socket.
+ *
+ * @param conn The WebSocket instance this event is occurring on.
+ */
+ void onWriteDemand(WebSocket conn);
+
+ /**
+ * @param conn The WebSocket instance this event is occurring on.
+ * @return Returns the address of the endpoint this socket is bound to.
+ * @see WebSocket#getLocalSocketAddress()
+ */
+ InetSocketAddress getLocalSocketAddress(WebSocket conn);
+
+ /**
+ * @param conn The WebSocket instance this event is occurring on.
+ * @return Returns the address of the endpoint this socket is connected to, or{@code null} if it
+ * is unconnected.
+ * @see WebSocket#getRemoteSocketAddress()
+ */
+ InetSocketAddress getRemoteSocketAddress(WebSocket conn);
}
diff --git a/src/main/java/org/java_websocket/WebSocketServerFactory.java b/src/main/java/org/java_websocket/WebSocketServerFactory.java
index 2a6c2347f..d6d5cce82 100644
--- a/src/main/java/org/java_websocket/WebSocketServerFactory.java
+++ b/src/main/java/org/java_websocket/WebSocketServerFactory.java
@@ -37,24 +37,26 @@
* Interface to encapsulate the required methods for a websocket factory
*/
public interface WebSocketServerFactory extends WebSocketFactory {
- @Override
- WebSocketImpl createWebSocket( WebSocketAdapter a, Draft d);
-
- @Override
- WebSocketImpl createWebSocket( WebSocketAdapter a, List
- * @throws IOException may be thrown while writing on the channel
- */
- ByteChannel wrapChannel(SocketChannel channel, SelectionKey key ) throws IOException;
-
- /**
- * Allows to shutdown the websocket factory for a clean shutdown
- */
- void close();
+
+ @Override
+ WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d);
+
+ @Override
+ WebSocketImpl createWebSocket(WebSocketAdapter a, List
+ * @throws IOException may be thrown while writing on the channel
+ */
+ ByteChannel wrapChannel(SocketChannel channel, SelectionKey key) throws IOException;
+
+ /**
+ * Allows to shutdown the websocket factory for a clean shutdown
+ */
+ void close();
}
diff --git a/src/main/java/org/java_websocket/WrappedByteChannel.java b/src/main/java/org/java_websocket/WrappedByteChannel.java
index 06c2f0b4f..8dee57db0 100644
--- a/src/main/java/org/java_websocket/WrappedByteChannel.java
+++ b/src/main/java/org/java_websocket/WrappedByteChannel.java
@@ -30,39 +30,47 @@
import java.nio.channels.ByteChannel;
public interface WrappedByteChannel extends ByteChannel {
- /**
- * returns whether writeMore should be called write additional data.
- * @return is a additional write needed
- */
- boolean isNeedWrite();
+ /**
+ * returns whether writeMore should be called write additional data.
+ *
+ * @return is a additional write needed
+ */
+ boolean isNeedWrite();
- /**
- * Gets called when {@link #isNeedWrite()} ()} requires a additional rite
- * @throws IOException may be thrown due to an error while writing
- */
- void writeMore() throws IOException;
+ /**
+ * Gets called when {@link #isNeedWrite()} ()} requires a additional rite
+ *
+ * @throws IOException may be thrown due to an error while writing
+ */
+ void writeMore() throws IOException;
- /**
- * returns whether readMore should be called to fetch data which has been decoded but not yet been returned.
- *
- * @see #read(ByteBuffer)
- * @see #readMore(ByteBuffer)
- * @return is a additional read needed
- **/
- boolean isNeedRead();
- /**
- * This function does not read data from the underlying channel at all. It is just a way to fetch data which has already be received or decoded but was but was not yet returned to the user.
- * This could be the case when the decoded data did not fit into the buffer the user passed to {@link #read(ByteBuffer)}.
- * @param dst the destiny of the read
- * @return the amount of remaining data
- * @throws IOException when a error occurred during unwrapping
- **/
- int readMore( ByteBuffer dst ) throws IOException;
+ /**
+ * returns whether readMore should be called to fetch data which has been decoded but not yet been
+ * returned.
+ *
+ * @return is a additional read needed
+ * @see #read(ByteBuffer)
+ * @see #readMore(ByteBuffer)
+ **/
+ boolean isNeedRead();
- /**
- * This function returns the blocking state of the channel
- * @return is the channel blocking
- */
- boolean isBlocking();
+ /**
+ * This function does not read data from the underlying channel at all. It is just a way to fetch
+ * data which has already be received or decoded but was but was not yet returned to the user.
+ * This could be the case when the decoded data did not fit into the buffer the user passed to
+ * {@link #read(ByteBuffer)}.
+ *
+ * @param dst the destiny of the read
+ * @return the amount of remaining data
+ * @throws IOException when a error occurred during unwrapping
+ **/
+ int readMore(ByteBuffer dst) throws IOException;
+
+ /**
+ * This function returns the blocking state of the channel
+ *
+ * @return is the channel blocking
+ */
+ boolean isBlocking();
}
diff --git a/src/main/java/org/java_websocket/client/DnsResolver.java b/src/main/java/org/java_websocket/client/DnsResolver.java
index 77b1823d8..ec9f17f06 100644
--- a/src/main/java/org/java_websocket/client/DnsResolver.java
+++ b/src/main/java/org/java_websocket/client/DnsResolver.java
@@ -30,25 +30,22 @@
import java.net.UnknownHostException;
/**
- * Users may implement this interface to override the default DNS lookup offered
- * by the OS.
+ * Users may implement this interface to override the default DNS lookup offered by the OS.
*
* @since 1.4.1
*/
public interface DnsResolver {
- /**
- * Resolves the IP address for the given URI.
- *
- * This method should never return null. If it's not able to resolve the IP
- * address then it should throw an UnknownHostException
- *
- * @param uri The URI to be resolved
- *
- * @return The resolved IP address
- *
- * @throws UnknownHostException if no IP address for the uri could be found.
- */
- InetAddress resolve(URI uri) throws UnknownHostException;
+ /**
+ * Resolves the IP address for the given URI.
+ * uri could be found.
+ */
+ InetAddress resolve(URI uri) throws UnknownHostException;
}
diff --git a/src/main/java/org/java_websocket/client/WebSocketClient.java b/src/main/java/org/java_websocket/client/WebSocketClient.java
index e75d33886..91288f080 100644
--- a/src/main/java/org/java_websocket/client/WebSocketClient.java
+++ b/src/main/java/org/java_websocket/client/WebSocketClient.java
@@ -62,866 +62,895 @@
import org.java_websocket.protocols.IProtocol;
/**
- * A subclass must implement at least onOpen, onClose, and onMessage to be
- * useful. At runtime the user is expected to establish a connection via {@link #connect()}, then receive events like {@link #onMessage(String)} via the overloaded methods and to {@link #send(String)} data to the server.
+ * A subclass must implement at least onOpen, onClose, and
+ * onMessage to be useful. At runtime the user is expected to establish a connection via
+ * {@link #connect()}, then receive events like {@link #onMessage(String)} via the overloaded
+ * methods and to {@link #send(String)} data to the server.
*/
public abstract class WebSocketClient extends AbstractWebSocket implements Runnable, WebSocket {
- /**
- * The URI this channel is supposed to connect to.
- */
- protected URI uri = null;
-
- /**
- * The underlying engine
- */
- private WebSocketImpl engine = null;
-
- /**
- * The socket for this WebSocketClient
- */
- private Socket socket = null;
-
- /**
- * The SocketFactory for this WebSocketClient
- * @since 1.4.0
- */
- private SocketFactory socketFactory = null;
-
- /**
- * The used OutputStream
- */
- private OutputStream ostream;
-
- /**
- * The used proxy, if any
- */
- private Proxy proxy = Proxy.NO_PROXY;
-
- /**
- * The thread to write outgoing message
- */
- private Thread writeThread;
-
- /**
- * The thread to connect and read message
- */
- private Thread connectReadThread;
-
- /**
- * The draft to use
- */
- private Draft draft;
-
- /**
- * The additional headers to use
- */
- private Map
- * For more infos see https://github.com/TooTallNate/Java-WebSocket/wiki/Drafts
- * @return The draft used for this client
- */
- public Draft getDraft() {
- return draft;
- }
-
- /**
- * Returns the socket to allow Hostname Verification
- * @return the socket used for this connection
- */
- public Socket getSocket() {
- return socket;
- }
-
- /**
- * @since 1.4.1
- * Adds an additional header to be sent in the handshake.
- * If the connection is already made, adding headers has no effect,
- * unless reconnect is called, which then a new handshake is sent.
- * If a header with the same key already exists, it is overridden.
- * @param key Name of the header to add.
- * @param value Value of the header to add.
- */
- public void addHeader(String key, String value){
- if(headers == null)
- headers = new TreeMap
- * @param key Name of the header to remove.
- * @return the previous value associated with key, or
- * null if there was no mapping for key.
- */
- public String removeHeader(String key) {
- if(headers == null)
- return null;
- return headers.remove(key);
- }
-
- /**
- * @since 1.4.1
- * Clears all previously put headers.
- */
- public void clearHeaders() {
- headers = null;
- }
-
- /**
- * Sets a custom DNS resolver.
- *
- * @param dnsResolver The DnsResolver to use.
- *
- * @since 1.4.1
- */
- public void setDnsResolver(DnsResolver dnsResolver) {
- this.dnsResolver = dnsResolver;
- }
-
- /**
- * Reinitiates the websocket connection. This method does not block.
- * @since 1.3.8
- */
- public void reconnect() {
- reset();
- connect();
- }
-
- /**
- * Same as reconnect but blocks until the websocket reconnected or failed to do so.
- * @return Returns whether it succeeded or not.
- * @throws InterruptedException Thrown when the threads get interrupted
- * @since 1.3.8
- */
- public boolean reconnectBlocking() throws InterruptedException {
- reset();
- return connectBlocking();
- }
-
- /**
- * Reset everything relevant to allow a reconnect
- * @since 1.3.8
- */
- private void reset() {
- Thread current = Thread.currentThread();
- if (current == writeThread || current == connectReadThread) {
- throw new IllegalStateException("You cannot initialize a reconnect out of the websocket thread. Use reconnect in another thread to ensure a successful cleanup.");
- }
- try {
- closeBlocking();
- if( writeThread != null ) {
- this.writeThread.interrupt();
- this.writeThread = null;
- }
- if( connectReadThread != null ) {
- this.connectReadThread.interrupt();
- this.connectReadThread = null;
- }
- this.draft.reset();
- if( this.socket != null ) {
- this.socket.close();
- this.socket = null;
- }
- } catch ( Exception e ) {
- onError( e );
- engine.closeConnection( CloseFrame.ABNORMAL_CLOSE, e.getMessage() );
- return;
- }
- connectLatch = new CountDownLatch( 1 );
- closeLatch = new CountDownLatch( 1 );
- this.engine = new WebSocketImpl( this, this.draft );
- }
-
- /**
- * Initiates the websocket connection. This method does not block.
- */
- public void connect() {
- if( connectReadThread != null )
- throw new IllegalStateException( "WebSocketClient objects are not reuseable" );
- connectReadThread = new Thread( this );
- connectReadThread.setName( "WebSocketConnectReadThread-" + connectReadThread.getId() );
- connectReadThread.start();
- }
-
- /**
- * Same as connect but blocks until the websocket connected or failed to do so.
- * @return Returns whether it succeeded or not.
- * @throws InterruptedException Thrown when the threads get interrupted
- */
- public boolean connectBlocking() throws InterruptedException {
- connect();
- connectLatch.await();
- return engine.isOpen();
- }
-
- /**
- * Same as connect but blocks with a timeout until the websocket connected or failed to do so.
- * @param timeout
- * The connect timeout
- * @param timeUnit
- * The timeout time unit
- * @return Returns whether it succeeded or not.
- * @throws InterruptedException Thrown when the threads get interrupted
- */
- public boolean connectBlocking(long timeout, TimeUnit timeUnit) throws InterruptedException {
- connect();
- return connectLatch.await(timeout, timeUnit) && engine.isOpen();
- }
-
- /**
- * Initiates the websocket close handshake. This method does not block
- * In oder to make sure the connection is closed use closeBlocking
- */
- public void close() {
- if( writeThread != null ) {
- engine.close( CloseFrame.NORMAL );
- }
- }
- /**
- * Same as close but blocks until the websocket closed or failed to do so.
- * @throws InterruptedException Thrown when the threads get interrupted
- */
- public void closeBlocking() throws InterruptedException {
- close();
- closeLatch.await();
- }
-
- /**
- * Sends text to the connected websocket server.
- *
- * @param text
- * The string which will be transmitted.
- */
- public void send( String text ) {
- engine.send( text );
- }
-
- /**
- * Sends binary data to the connected webSocket server.
- *
- * @param data
- * The byte-Array of data to send to the WebSocket server.
- */
- public void send( byte[] data ) {
- engine.send( data );
- }
-
- @Override
- public
- * This method will be called primarily because of IO or protocol errors.
- * If the given exception is an RuntimeException that probably means that you encountered a bug.
- *
- * @param ex The exception causing this error
- **/
- public abstract void onError( Exception ex );
-
- /**
- * Callback for binary messages received from the remote host
- *
- * @see #onMessage(String)
- *
- * @param bytes
- * The binary message that was received.
- **/
- public void onMessage( ByteBuffer bytes ) {
- //To overwrite
- }
-
-
- private class WebsocketWriteThread implements Runnable {
-
- private final WebSocketClient webSocketClient;
-
- WebsocketWriteThread(WebSocketClient webSocketClient) {
- this.webSocketClient = webSocketClient;
- }
-
- @Override
- public void run() {
- Thread.currentThread().setName( "WebSocketWriteThread-" + Thread.currentThread().getId() );
- try {
- runWriteData();
- } catch ( IOException e ) {
- handleIOException( e );
- } finally {
- closeSocket();
- writeThread = null;
- }
- }
-
- /**
- * Write the data into the outstream
- * @throws IOException if write or flush did not work
- */
- private void runWriteData() throws IOException {
- try {
- while( !Thread.interrupted() ) {
- ByteBuffer buffer = engine.outQueue.take();
- ostream.write( buffer.array(), 0, buffer.limit() );
- ostream.flush();
- }
- } catch ( InterruptedException e ) {
- for (ByteBuffer buffer : engine.outQueue) {
- ostream.write( buffer.array(), 0, buffer.limit() );
- ostream.flush();
- }
- Thread.currentThread().interrupt();
- }
- }
-
- /**
- * Closing the socket
- */
- private void closeSocket() {
- try {
- if( socket != null ) {
- socket.close();
- }
- } catch ( IOException ex ) {
- onWebsocketError( webSocketClient, ex );
- }
- }
- }
-
-
-
-
- /**
- * Method to set a proxy for this connection
- * @param proxy the proxy to use for this websocket client
- */
- public void setProxy( Proxy proxy ) {
- if( proxy == null )
- throw new IllegalArgumentException();
- this.proxy = proxy;
- }
-
- /**
- * Accepts bound and unbound sockets.
- * This method must be called before connect.
- * If the given socket is not yet bound it will be bound to the uri specified in the constructor.
- * @param socket The socket which should be used for the connection
- * @deprecated use setSocketFactory
- */
- @Deprecated
- public void setSocket( Socket socket ) {
- if( this.socket != null ) {
- throw new IllegalStateException( "socket has already been set" );
- }
- this.socket = socket;
- }
-
- /**
- * Accepts a SocketFactory.
- * This method must be called before connect.
- * The socket will be bound to the uri specified in the constructor.
- * @param socketFactory The socket factory which should be used for the connection.
- */
- public void setSocketFactory(SocketFactory socketFactory) {
- this.socketFactory = socketFactory;
- }
-
- @Override
- public void sendFragmentedFrame(Opcode op, ByteBuffer buffer, boolean fin ) {
- engine.sendFragmentedFrame( op, buffer, fin );
- }
-
- @Override
- public boolean isOpen() {
- return engine.isOpen();
- }
-
- @Override
- public boolean isFlushAndClose() {
- return engine.isFlushAndClose();
- }
-
- @Override
- public boolean isClosed() {
- return engine.isClosed();
- }
-
- @Override
- public boolean isClosing() {
- return engine.isClosing();
- }
-
- @Override
- public boolean hasBufferedData() {
- return engine.hasBufferedData();
- }
-
- @Override
- public void close( int code ) {
- engine.close( code );
- }
-
- @Override
- public void close( int code, String message ) {
- engine.close( code, message );
- }
-
- @Override
- public void closeConnection( int code, String message ) {
- engine.closeConnection( code, message );
- }
-
- @Override
- public void send( ByteBuffer bytes ) {
- engine.send( bytes );
- }
-
- @Override
- public void sendFrame( Framedata framedata ) {
- engine.sendFrame( framedata );
- }
-
- @Override
- public void sendFrame( Collection
For more infos see
+ * https://github.com/TooTallNate/Java-WebSocket/wiki/Drafts
+ *
+ * @return The draft used for this client
+ */
+ public Draft getDraft() {
+ return draft;
+ }
+
+ /**
+ * Returns the socket to allow Hostname Verification
+ *
+ * @return the socket used for this connection
+ */
+ public Socket getSocket() {
+ return socket;
+ }
+
+ /**
+ * @param key Name of the header to add.
+ * @param value Value of the header to add.
+ * @since 1.4.1 Adds an additional header to be sent in the handshake.
If the connection is
+ * already made, adding headers has no effect, unless reconnect is called, which then a new
+ * handshake is sent.
If a header with the same key already exists, it is overridden.
+ */
+ public void addHeader(String key, String value) {
+ if (headers == null) {
+ headers = new TreeMap
+ */
+ public String removeHeader(String key) {
+ if (headers == null) {
+ return null;
+ }
+ return headers.remove(key);
+ }
+
+ /**
+ * @since 1.4.1 Clears all previously put headers.
+ */
+ public void clearHeaders() {
+ headers = null;
+ }
+
+ /**
+ * Sets a custom DNS resolver.
+ *
+ * @param dnsResolver The DnsResolver to use.
+ * @since 1.4.1
+ */
+ public void setDnsResolver(DnsResolver dnsResolver) {
+ this.dnsResolver = dnsResolver;
+ }
+
+ /**
+ * Reinitiates the websocket connection. This method does not block.
+ *
+ * @since 1.3.8
+ */
+ public void reconnect() {
+ reset();
+ connect();
+ }
+
+ /**
+ * Same as reconnect but blocks until the websocket reconnected or failed to do
+ * so.
+ *
+ * @return Returns whether it succeeded or not.
+ * @throws InterruptedException Thrown when the threads get interrupted
+ * @since 1.3.8
+ */
+ public boolean reconnectBlocking() throws InterruptedException {
+ reset();
+ return connectBlocking();
+ }
+
+ /**
+ * Reset everything relevant to allow a reconnect
+ *
+ * @since 1.3.8
+ */
+ private void reset() {
+ Thread current = Thread.currentThread();
+ if (current == writeThread || current == connectReadThread) {
+ throw new IllegalStateException(
+ "You cannot initialize a reconnect out of the websocket thread. Use reconnect in another thread to ensure a successful cleanup.");
+ }
+ try {
+ closeBlocking();
+ if (writeThread != null) {
+ this.writeThread.interrupt();
+ this.writeThread = null;
+ }
+ if (connectReadThread != null) {
+ this.connectReadThread.interrupt();
+ this.connectReadThread = null;
+ }
+ this.draft.reset();
+ if (this.socket != null) {
+ this.socket.close();
+ this.socket = null;
+ }
+ } catch (Exception e) {
+ onError(e);
+ engine.closeConnection(CloseFrame.ABNORMAL_CLOSE, e.getMessage());
+ return;
+ }
+ connectLatch = new CountDownLatch(1);
+ closeLatch = new CountDownLatch(1);
+ this.engine = new WebSocketImpl(this, this.draft);
+ }
+
+ /**
+ * Initiates the websocket connection. This method does not block.
+ */
+ public void connect() {
+ if (connectReadThread != null) {
+ throw new IllegalStateException("WebSocketClient objects are not reuseable");
+ }
+ connectReadThread = new Thread(this);
+ connectReadThread.setName("WebSocketConnectReadThread-" + connectReadThread.getId());
+ connectReadThread.start();
+ }
+
+ /**
+ * Same as connect but blocks until the websocket connected or failed to do so.
+ *
+ * @return Returns whether it succeeded or not.
+ * @throws InterruptedException Thrown when the threads get interrupted
+ */
+ public boolean connectBlocking() throws InterruptedException {
+ connect();
+ connectLatch.await();
+ return engine.isOpen();
+ }
+
+ /**
+ * Same as connect but blocks with a timeout until the websocket connected or failed
+ * to do so.
+ *
+ * @param timeout The connect timeout
+ * @param timeUnit The timeout time unit
+ * @return Returns whether it succeeded or not.
+ * @throws InterruptedException Thrown when the threads get interrupted
+ */
+ public boolean connectBlocking(long timeout, TimeUnit timeUnit) throws InterruptedException {
+ connect();
+ return connectLatch.await(timeout, timeUnit) && engine.isOpen();
+ }
+
+ /**
+ * Initiates the websocket close handshake. This method does not block
In oder to make sure
+ * the connection is closed use closeBlocking
+ */
+ public void close() {
+ if (writeThread != null) {
+ engine.close(CloseFrame.NORMAL);
+ }
+ }
+
+ /**
+ * Same as close but blocks until the websocket closed or failed to do so.
+ *
+ * @throws InterruptedException Thrown when the threads get interrupted
+ */
+ public void closeBlocking() throws InterruptedException {
+ close();
+ closeLatch.await();
+ }
+
+ /**
+ * Sends text to the connected websocket server.
+ *
+ * @param text The string which will be transmitted.
+ */
+ public void send(String text) {
+ engine.send(text);
+ }
+
+ /**
+ * Sends binary data to the connected webSocket server.
+ *
+ * @param data The byte-Array of data to send to the WebSocket server.
+ */
+ public void send(byte[] data) {
+ engine.send(data);
+ }
+
+ @Override
+ public
This method will be called
+ * primarily because of IO or protocol errors.
If the given exception is an RuntimeException
+ * that probably means that you encountered a bug.
+ *
+ * @param ex The exception causing this error
+ **/
+ public abstract void onError(Exception ex);
+
+ /**
+ * Callback for binary messages received from the remote host
+ *
+ * @param bytes The binary message that was received.
+ * @see #onMessage(String)
+ **/
+ public void onMessage(ByteBuffer bytes) {
+ //To overwrite
+ }
+
+
+ private class WebsocketWriteThread implements Runnable {
+
+ private final WebSocketClient webSocketClient;
+
+ WebsocketWriteThread(WebSocketClient webSocketClient) {
+ this.webSocketClient = webSocketClient;
+ }
+
+ @Override
+ public void run() {
+ Thread.currentThread().setName("WebSocketWriteThread-" + Thread.currentThread().getId());
+ try {
+ runWriteData();
+ } catch (IOException e) {
+ handleIOException(e);
+ } finally {
+ closeSocket();
+ writeThread = null;
+ }
+ }
+
+ /**
+ * Write the data into the outstream
+ *
+ * @throws IOException if write or flush did not work
+ */
+ private void runWriteData() throws IOException {
+ try {
+ while (!Thread.interrupted()) {
+ ByteBuffer buffer = engine.outQueue.take();
+ ostream.write(buffer.array(), 0, buffer.limit());
+ ostream.flush();
+ }
+ } catch (InterruptedException e) {
+ for (ByteBuffer buffer : engine.outQueue) {
+ ostream.write(buffer.array(), 0, buffer.limit());
+ ostream.flush();
+ }
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ /**
+ * Closing the socket
+ */
+ private void closeSocket() {
+ try {
+ if (socket != null) {
+ socket.close();
+ }
+ } catch (IOException ex) {
+ onWebsocketError(webSocketClient, ex);
+ }
+ }
+ }
+
+
+ /**
+ * Method to set a proxy for this connection
+ *
+ * @param proxy the proxy to use for this websocket client
+ */
+ public void setProxy(Proxy proxy) {
+ if (proxy == null) {
+ throw new IllegalArgumentException();
+ }
+ this.proxy = proxy;
+ }
+
+ /**
+ * Accepts bound and unbound sockets.
This method must be called before connect.
+ * If the given socket is not yet bound it will be bound to the uri specified in the constructor.
+ *
+ * @param socket The socket which should be used for the connection
+ * @deprecated use setSocketFactory
+ */
+ @Deprecated
+ public void setSocket(Socket socket) {
+ if (this.socket != null) {
+ throw new IllegalStateException("socket has already been set");
+ }
+ this.socket = socket;
+ }
+
+ /**
+ * Accepts a SocketFactory.
This method must be called before connect. The socket
+ * will be bound to the uri specified in the constructor.
+ *
+ * @param socketFactory The socket factory which should be used for the connection.
+ */
+ public void setSocketFactory(SocketFactory socketFactory) {
+ this.socketFactory = socketFactory;
+ }
+
+ @Override
+ public void sendFragmentedFrame(Opcode op, ByteBuffer buffer, boolean fin) {
+ engine.sendFragmentedFrame(op, buffer, fin);
+ }
+
+ @Override
+ public boolean isOpen() {
+ return engine.isOpen();
+ }
+
+ @Override
+ public boolean isFlushAndClose() {
+ return engine.isFlushAndClose();
+ }
+
+ @Override
+ public boolean isClosed() {
+ return engine.isClosed();
+ }
+
+ @Override
+ public boolean isClosing() {
+ return engine.isClosing();
+ }
+
+ @Override
+ public boolean hasBufferedData() {
+ return engine.hasBufferedData();
+ }
+
+ @Override
+ public void close(int code) {
+ engine.close(code);
+ }
+
+ @Override
+ public void close(int code, String message) {
+ engine.close(code, message);
+ }
+
+ @Override
+ public void closeConnection(int code, String message) {
+ engine.closeConnection(code, message);
+ }
+
+ @Override
+ public void send(ByteBuffer bytes) {
+ engine.send(bytes);
+ }
+
+ @Override
+ public void sendFrame(Framedata framedata) {
+ engine.sendFrame(framedata);
+ }
+
+ @Override
+ public void sendFrame(Collection
- * The copy can be safely used in conjunction with a new websocket connection.
- * @return a copy of the draft
- */
- public abstract Draft copyInstance();
-
- public Handshakedata translateHandshake( ByteBuffer buf ) throws InvalidHandshakeException {
- return translateHandshakeHttp( buf, role );
- }
-
- public int checkAlloc( int bytecount ) throws InvalidDataException {
- if( bytecount < 0 )
- throw new InvalidDataException( CloseFrame.PROTOCOL_ERROR, "Negative count" );
- return bytecount;
- }
-
- int readVersion( Handshakedata handshakedata ) {
- String vers = handshakedata.getFieldValue( "Sec-WebSocket-Version" );
- if( vers.length() > 0 ) {
- int v;
- try {
- v = new Integer( vers.trim() );
- return v;
- } catch ( NumberFormatException e ) {
- return -1;
- }
- }
- return -1;
- }
-
- public void setParseMode( Role role ) {
- this.role = role;
- }
-
- public Role getRole() {
- return role;
- }
-
- public String toString() {
- return getClass().getSimpleName();
- }
+ /**
+ * In some cases the handshake will be parsed different depending on whether
+ */
+ protected Role role = null;
+
+ protected Opcode continuousFrameType = null;
+
+ public static ByteBuffer readLine(ByteBuffer buf) {
+ ByteBuffer sbuf = ByteBuffer.allocate(buf.remaining());
+ byte prev;
+ byte cur = '0';
+ while (buf.hasRemaining()) {
+ prev = cur;
+ cur = buf.get();
+ sbuf.put(cur);
+ if (prev == (byte) '\r' && cur == (byte) '\n') {
+ sbuf.limit(sbuf.position() - 2);
+ sbuf.position(0);
+ return sbuf;
+
+ }
+ }
+ // ensure that there wont be any bytes skipped
+ buf.position(buf.position() - sbuf.position());
+ return null;
+ }
+
+ public static String readStringLine(ByteBuffer buf) {
+ ByteBuffer b = readLine(buf);
+ return b == null ? null : Charsetfunctions.stringAscii(b.array(), 0, b.limit());
+ }
+
+ public static HandshakeBuilder translateHandshakeHttp(ByteBuffer buf, Role role)
+ throws InvalidHandshakeException {
+ HandshakeBuilder handshake;
+
+ String line = readStringLine(buf);
+ if (line == null) {
+ throw new IncompleteHandshakeException(buf.capacity() + 128);
+ }
+
+ String[] firstLineTokens = line.split(" ", 3);// eg. HTTP/1.1 101 Switching the Protocols
+ if (firstLineTokens.length != 3) {
+ throw new InvalidHandshakeException();
+ }
+ if (role == Role.CLIENT) {
+ handshake = translateHandshakeHttpClient(firstLineTokens, line);
+ } else {
+ handshake = translateHandshakeHttpServer(firstLineTokens, line);
+ }
+ line = readStringLine(buf);
+ while (line != null && line.length() > 0) {
+ String[] pair = line.split(":", 2);
+ if (pair.length != 2) {
+ throw new InvalidHandshakeException("not an http header");
+ }
+ // If the handshake contains already a specific key, append the new value
+ if (handshake.hasFieldValue(pair[0])) {
+ handshake.put(pair[0],
+ handshake.getFieldValue(pair[0]) + "; " + pair[1].replaceFirst("^ +", ""));
+ } else {
+ handshake.put(pair[0], pair[1].replaceFirst("^ +", ""));
+ }
+ line = readStringLine(buf);
+ }
+ if (line == null) {
+ throw new IncompleteHandshakeException();
+ }
+ return handshake;
+ }
+
+ /**
+ * Checking the handshake for the role as server
+ *
+ * @param firstLineTokens the token of the first line split as as an string array
+ * @param line the whole line
+ * @return a handshake
+ */
+ private static HandshakeBuilder translateHandshakeHttpServer(String[] firstLineTokens,
+ String line) throws InvalidHandshakeException {
+ // translating/parsing the request from the CLIENT
+ if (!"GET".equalsIgnoreCase(firstLineTokens[0])) {
+ throw new InvalidHandshakeException(String
+ .format("Invalid request method received: %s Status line: %s", firstLineTokens[0], line));
+ }
+ if (!"HTTP/1.1".equalsIgnoreCase(firstLineTokens[2])) {
+ throw new InvalidHandshakeException(String
+ .format("Invalid status line received: %s Status line: %s", firstLineTokens[2], line));
+ }
+ ClientHandshakeBuilder clienthandshake = new HandshakeImpl1Client();
+ clienthandshake.setResourceDescriptor(firstLineTokens[1]);
+ return clienthandshake;
+ }
+
+ /**
+ * Checking the handshake for the role as client
+ *
+ * @param firstLineTokens the token of the first line split as as an string array
+ * @param line the whole line
+ * @return a handshake
+ */
+ private static HandshakeBuilder translateHandshakeHttpClient(String[] firstLineTokens,
+ String line) throws InvalidHandshakeException {
+ // translating/parsing the response from the SERVER
+ if (!"101".equals(firstLineTokens[1])) {
+ throw new InvalidHandshakeException(String
+ .format("Invalid status code received: %s Status line: %s", firstLineTokens[1], line));
+ }
+ if (!"HTTP/1.1".equalsIgnoreCase(firstLineTokens[0])) {
+ throw new InvalidHandshakeException(String
+ .format("Invalid status line received: %s Status line: %s", firstLineTokens[0], line));
+ }
+ HandshakeBuilder handshake = new HandshakeImpl1Server();
+ ServerHandshakeBuilder serverhandshake = (ServerHandshakeBuilder) handshake;
+ serverhandshake.setHttpStatus(Short.parseShort(firstLineTokens[1]));
+ serverhandshake.setHttpStatusMessage(firstLineTokens[2]);
+ return handshake;
+ }
+
+ public abstract HandshakeState acceptHandshakeAsClient(ClientHandshake request,
+ ServerHandshake response) throws InvalidHandshakeException;
+
+ public abstract HandshakeState acceptHandshakeAsServer(ClientHandshake handshakedata)
+ throws InvalidHandshakeException;
+
+ protected boolean basicAccept(Handshakedata handshakedata) {
+ return handshakedata.getFieldValue("Upgrade").equalsIgnoreCase("websocket") && handshakedata
+ .getFieldValue("Connection").toLowerCase(Locale.ENGLISH).contains("upgrade");
+ }
+
+ public abstract ByteBuffer createBinaryFrame(Framedata framedata);
+
+ public abstract List
The copy can be safely used in conjunction with a new websocket
+ * connection.
+ *
+ * @return a copy of the draft
+ */
+ public abstract Draft copyInstance();
+
+ public Handshakedata translateHandshake(ByteBuffer buf) throws InvalidHandshakeException {
+ return translateHandshakeHttp(buf, role);
+ }
+
+ public int checkAlloc(int bytecount) throws InvalidDataException {
+ if (bytecount < 0) {
+ throw new InvalidDataException(CloseFrame.PROTOCOL_ERROR, "Negative count");
+ }
+ return bytecount;
+ }
+
+ int readVersion(Handshakedata handshakedata) {
+ String vers = handshakedata.getFieldValue("Sec-WebSocket-Version");
+ if (vers.length() > 0) {
+ int v;
+ try {
+ v = new Integer(vers.trim());
+ return v;
+ } catch (NumberFormatException e) {
+ return -1;
+ }
+ }
+ return -1;
+ }
+
+ public void setParseMode(Role role) {
+ this.role = role;
+ }
+
+ public Role getRole() {
+ return role;
+ }
+
+ public String toString() {
+ return getClass().getSimpleName();
+ }
}
diff --git a/src/main/java/org/java_websocket/drafts/Draft_6455.java b/src/main/java/org/java_websocket/drafts/Draft_6455.java
index b6259c957..8898babb0 100644
--- a/src/main/java/org/java_websocket/drafts/Draft_6455.java
+++ b/src/main/java/org/java_websocket/drafts/Draft_6455.java
@@ -46,1041 +46,1123 @@
import java.util.*;
/**
- * Implementation for the RFC 6455 websocket protocol
- * This is the recommended class for your websocket connection
+ * Implementation for the RFC 6455 websocket protocol This is the recommended class for your
+ * websocket connection
*/
public class Draft_6455 extends Draft {
- /**
- * Handshake specific field for the key
- */
- private static final String SEC_WEB_SOCKET_KEY = "Sec-WebSocket-Key";
-
- /**
- * Handshake specific field for the protocol
- */
- private static final String SEC_WEB_SOCKET_PROTOCOL = "Sec-WebSocket-Protocol";
-
- /**
- * Handshake specific field for the extension
- */
- private static final String SEC_WEB_SOCKET_EXTENSIONS = "Sec-WebSocket-Extensions";
-
- /**
- * Handshake specific field for the accept
- */
- private static final String SEC_WEB_SOCKET_ACCEPT = "Sec-WebSocket-Accept";
-
- /**
- * Handshake specific field for the upgrade
- */
- private static final String UPGRADE = "Upgrade" ;
-
- /**
- * Handshake specific field for the connection
- */
- private static final String CONNECTION = "Connection";
-
- /**
- * Logger instance
- *
- * @since 1.4.0
- */
- private final Logger log = LoggerFactory.getLogger(Draft_6455.class);
-
- /**
- * Attribute for the used extension in this draft
- */
- private IExtension extension = new DefaultExtension();
-
- /**
- * Attribute for all available extension in this draft
- */
- private List
- * The copy can be safely used in conjunction with a new websocket connection.
- * @return a copy of the extension
- * @since 1.3.5
- */
- IExtension copyInstance();
+ /**
+ * Extensions must only be by one websocket at all. To prevent extensions to be used more than
+ * once the Websocket implementation should call this method in order to create a new usable
+ * version of a given extension instance.
The copy can be safely used in conjunction with a
+ * new websocket connection.
+ *
+ * @return a copy of the extension
+ * @since 1.3.5
+ */
+ IExtension copyInstance();
- /**
- * Cleaning up internal stats when the draft gets reset.
- * @since 1.3.5
- */
- void reset();
+ /**
+ * Cleaning up internal stats when the draft gets reset.
+ *
+ * @since 1.3.5
+ */
+ void reset();
- /**
- * Return a string which should contain the class name as well as additional information about the current configurations for this extension (DEBUG purposes)
- *
- * @return a string containing the class name as well as additional information
- * @since 1.3.5
- */
- String toString();
+ /**
+ * Return a string which should contain the class name as well as additional information about the
+ * current configurations for this extension (DEBUG purposes)
+ *
+ * @return a string containing the class name as well as additional information
+ * @since 1.3.5
+ */
+ String toString();
}
diff --git a/src/main/java/org/java_websocket/extensions/package-info.java b/src/main/java/org/java_websocket/extensions/package-info.java
index 2a3338b7c..251cbdf9f 100644
--- a/src/main/java/org/java_websocket/extensions/package-info.java
+++ b/src/main/java/org/java_websocket/extensions/package-info.java
@@ -24,6 +24,7 @@
*/
/**
- * This package encapsulates all interfaces and implementations in relation with the WebSocket Sec-WebSocket-Extensions.
+ * This package encapsulates all interfaces and implementations in relation with the WebSocket
+ * Sec-WebSocket-Extensions.
*/
package org.java_websocket.extensions;
\ No newline at end of file
diff --git a/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java b/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java
index d5f1d95b4..6e414636f 100644
--- a/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java
+++ b/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java
@@ -23,107 +23,106 @@
import java.util.zip.Inflater;
/**
- * PerMessage Deflate Extension (7. The "permessage-deflate" Extension in
+ * PerMessage Deflate Extension (7. The
+ * "permessage-deflate" Extension in
* RFC 7692).
*
- * @see 7. The "permessage-deflate" Extension in RFC 7692
+ * @see 7. The "permessage-deflate"
+ * Extension in RFC 7692
*/
public class PerMessageDeflateExtension extends CompressionExtension {
- // Name of the extension as registered by IETF https://tools.ietf.org/html/rfc7692#section-9.
- private static final String EXTENSION_REGISTERED_NAME = "permessage-deflate";
- // Below values are defined for convenience. They are not used in the compression/decompression phase.
- // They may be needed during the extension-negotiation offer in the future.
- private static final String SERVER_NO_CONTEXT_TAKEOVER = "server_no_context_takeover";
- private static final String CLIENT_NO_CONTEXT_TAKEOVER = "client_no_context_takeover";
- private static final String SERVER_MAX_WINDOW_BITS = "server_max_window_bits";
- private static final String CLIENT_MAX_WINDOW_BITS = "client_max_window_bits";
- private static final int serverMaxWindowBits = 1 << 15;
- private static final int clientMaxWindowBits = 1 << 15;
- private static final byte[] TAIL_BYTES = { (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF };
- private static final int BUFFER_SIZE = 1 << 10;
-
- private boolean serverNoContextTakeover = true;
- private boolean clientNoContextTakeover = false;
-
- // For WebSocketServers, this variable holds the extension parameters that the peer client has requested.
- // For WebSocketClients, this variable holds the extension parameters that client himself has requested.
- private Map