autobahn 0.3.1__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Python27/Lib/site-packages/autobahn/__init__.py +22 -0
- Python27/Lib/site-packages/autobahn/__init__.pyc +0 -0
- Python27/Lib/site-packages/autobahn/autobahn.py +76 -0
- Python27/Lib/site-packages/autobahn/autobahn.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/__init__.py +207 -0
- Python27/Lib/site-packages/autobahn/case/__init__.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case.py +68 -0
- Python27/Lib/site-packages/autobahn/case/case.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_1.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_2.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_3.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_4.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_5.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_6.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_7.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_7.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_8.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_1_8.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_1.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_2.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_3.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_4.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_5.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_6.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_7.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_7.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_8.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case1_2_8.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_1.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case2_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_10.py +37 -0
- Python27/Lib/site-packages/autobahn/case/case2_10.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_11.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case2_11.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_2.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case2_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_3.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case2_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_4.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case2_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_5.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case2_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_6.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case2_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_7.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case2_7.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_8.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case2_8.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case2_9.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case2_9.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case3_1.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case3_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case3_2.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case3_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case3_3.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case3_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case3_4.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case3_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case3_5.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case3_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case3_6.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case3_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case3_7.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case3_7.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_1.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_2.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_3.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_4.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_5.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case4_1_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_1.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_2.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_3.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_4.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_5.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case4_2_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_1.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_10.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_10.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_11.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_11.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_12.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_12.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_13.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_13.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_14.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_14.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_15.py +35 -0
- Python27/Lib/site-packages/autobahn/case/case5_15.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_16.py +33 -0
- Python27/Lib/site-packages/autobahn/case/case5_16.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_17.py +33 -0
- Python27/Lib/site-packages/autobahn/case/case5_17.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_18.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_18.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_19.py +56 -0
- Python27/Lib/site-packages/autobahn/case/case5_19.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_2.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_20.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_20.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_3.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case5_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_4.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case5_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_5.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case5_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_6.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case5_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_7.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case5_7.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_8.py +34 -0
- Python27/Lib/site-packages/autobahn/case/case5_8.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case5_9.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case5_9.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case6_1.py +30 -0
- Python27/Lib/site-packages/autobahn/case/case6_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case6_2.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case6_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case6_3.py +33 -0
- Python27/Lib/site-packages/autobahn/case/case6_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_1.py +54 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_2.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_3.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_4.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_5.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_6.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_1_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_1.py +54 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_2.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_3.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_4.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_5.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_6.py +31 -0
- Python27/Lib/site-packages/autobahn/case/case9_2_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_1.py +55 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_2.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_3.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_4.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_5.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_6.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_7.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_7.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_8.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_8.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_9.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_3_9.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_1.py +55 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_2.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_3.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_4.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_5.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_6.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_7.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_7.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_8.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_8.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_9.py +32 -0
- Python27/Lib/site-packages/autobahn/case/case9_4_9.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_1.py +58 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_2.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_3.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_4.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_5.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_6.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_5_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_1.py +58 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_1.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_2.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_2.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_3.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_3.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_4.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_4.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_5.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_5.pyc +0 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_6.py +28 -0
- Python27/Lib/site-packages/autobahn/case/case9_6_6.pyc +0 -0
- Python27/Lib/site-packages/autobahn/fuzzing.py +911 -0
- Python27/Lib/site-packages/autobahn/fuzzing.pyc +0 -0
- Python27/Lib/site-packages/autobahn/websocket.py +1505 -0
- Python27/Lib/site-packages/autobahn/websocket.pyc +0 -0
- Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/PKG-INFO +10 -0
- Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/SOURCES.txt +124 -0
- Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/dependency_links.txt +1 -0
- Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/not-zip-safe +1 -0
- Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/requires.txt +1 -0
- Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case3_1(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message with <b>RSV = 1</b>."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """The connection is failed immediately, since RSV must be 0, when no extension defining RSV meaning has been negoiated."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
29
|
+
self.p.sendFrame(opcode = 1, payload = "Hello, world!", rsv = 1)
|
|
30
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case3_2(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send again with <b>RSV = 2</b>, then send Ping."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """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 negoiated. The Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload)
|
|
32
|
+
self.p.sendFrame(opcode = 1, payload = payload, rsv = 2)
|
|
33
|
+
self.p.sendFrame(opcode = 9)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case3_3(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send again with <b>RSV = 3</b>, then send Ping. Octets are sent in frame-wise chops. Octets are sent in octet-wise chops."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """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 negoiated. The Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload, sync = True)
|
|
32
|
+
self.p.sendFrame(opcode = 1, payload = payload, rsv = 3, sync = True)
|
|
33
|
+
self.p.sendFrame(opcode = 9, sync = True)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case3_4(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send again with <b>RSV = 4</b>, then send Ping. Octets are sent in octet-wise chops."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """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 negoiated. The Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload, chopsize = 1)
|
|
32
|
+
self.p.sendFrame(opcode = 1, payload = payload, rsv = 4, chopsize = 1)
|
|
33
|
+
self.p.sendFrame(opcode = 9, chopsize = 1)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case3_5(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small binary message with <b>RSV = 5</b>."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """The connection is failed immediately, since RSV must be 0."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "\x00\xff\xfe\xfd\xfc\xfb\x00\xff"
|
|
29
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
30
|
+
self.p.sendFrame(opcode = 2, payload = payload, rsv = 5)
|
|
31
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case3_6(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send Ping with <b>RSV = 6</b>."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """The connection is failed immediately, since RSV must be 0."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
30
|
+
self.p.sendFrame(opcode = 2, payload = payload, rsv = 6)
|
|
31
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case3_7(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send Close with <b>RSV = 7</b>."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """The connection is failed immediately, since RSV must be 0."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
29
|
+
self.p.sendFrame(opcode = 8, rsv = 7)
|
|
30
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_1_1(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send frame with reserved non-control <b>Opcode = 3</b>."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """The connection is failed immediately."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
29
|
+
self.p.sendFrame(opcode = 3)
|
|
30
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_1_2(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send frame with reserved non-control <b>Opcode = 4</b> and non-empty payload."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """The connection is failed immediately."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
29
|
+
self.p.sendFrame(opcode = 4, payload = "reserved opcode payload")
|
|
30
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_1_3(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send frame with reserved non-control <b>Opcode = 5</b>, then send Ping."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload)
|
|
32
|
+
self.p.sendFrame(opcode = 5)
|
|
33
|
+
self.p.sendFrame(opcode = 9)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_1_4(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send frame with reserved non-control <b>Opcode = 6</b> and non-empty payload, then send Ping."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload)
|
|
32
|
+
self.p.sendFrame(opcode = 6, payload = payload)
|
|
33
|
+
self.p.sendFrame(opcode = 9)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_1_5(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send frame with reserved non-control <b>Opcode = 7</b> and non-empty payload, then send Ping."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload, chopsize = 1)
|
|
32
|
+
self.p.sendFrame(opcode = 7, payload = payload, chopsize = 1)
|
|
33
|
+
self.p.sendFrame(opcode = 9, chopsize = 1)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_2_1(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send frame with reserved control <b>Opcode = 11</b>."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """The connection is failed immediately."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
29
|
+
self.p.sendFrame(opcode = 11)
|
|
30
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_2_2(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send frame with reserved control <b>Opcode = 12</b> and non-empty payload."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """The connection is failed immediately."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
29
|
+
self.p.sendFrame(opcode = 12, payload = "reserved opcode payload")
|
|
30
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_2_3(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send frame with reserved control <b>Opcode = 13</b>, then send Ping."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload)
|
|
32
|
+
self.p.sendFrame(opcode = 13)
|
|
33
|
+
self.p.sendFrame(opcode = 9)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_2_4(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send frame with reserved control <b>Opcode = 14</b> and non-empty payload, then send Ping."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload)
|
|
32
|
+
self.p.sendFrame(opcode = 14, payload = payload)
|
|
33
|
+
self.p.sendFrame(opcode = 9)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case4_2_5(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send small text message, then send frame with reserved control <b>Opcode = 15</b> and non-empty payload, then send Ping."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """Echo for first message is received, but then connection is failed immediately, since reserved opcode frame is used. A Pong is not received."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
payload = "Hello, world!"
|
|
29
|
+
self.expected[Case.OK] = [("message", payload, False), ("failedByMe", False)]
|
|
30
|
+
self.expected[Case.NON_STRICT] = [("failedByMe", False)]
|
|
31
|
+
self.p.sendFrame(opcode = 1, payload = payload, chopsize = 1)
|
|
32
|
+
self.p.sendFrame(opcode = 15, payload = payload, chopsize = 1)
|
|
33
|
+
self.p.sendFrame(opcode = 9, chopsize = 1)
|
|
34
|
+
self.p.killAfter(1)
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
##
|
|
3
|
+
## Copyright 2011 Tavendo GmbH
|
|
4
|
+
##
|
|
5
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
## you may not use this file except in compliance with the License.
|
|
7
|
+
## You may obtain a copy of the License at
|
|
8
|
+
##
|
|
9
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
##
|
|
11
|
+
## Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
## See the License for the specific language governing permissions and
|
|
15
|
+
## limitations under the License.
|
|
16
|
+
##
|
|
17
|
+
###############################################################################
|
|
18
|
+
|
|
19
|
+
from case import Case
|
|
20
|
+
|
|
21
|
+
class Case5_1(Case):
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = """Send Ping fragmented into 2 fragments."""
|
|
24
|
+
|
|
25
|
+
EXPECTATION = """Connection is failed immediately, since control message MUST NOT be fragmented."""
|
|
26
|
+
|
|
27
|
+
def onOpen(self):
|
|
28
|
+
self.expected[Case.OK] = [("failedByMe", False)]
|
|
29
|
+
self.p.sendFrame(opcode = 9, fin = False, payload = "fragment1")
|
|
30
|
+
self.p.sendFrame(opcode = 0, fin = True, payload = "fragment2")
|
|
31
|
+
self.p.killAfter(1)
|
|
Binary file
|