diff --git a/TODO b/TODO index a8b91c14..91404c38 100644 --- a/TODO +++ b/TODO @@ -68,7 +68,7 @@ REQ = someone asked for it - REQ: Overview report gets too broad: maybe rotate agent labels in report 90° counterclock => css - - REQ: make NON-STRICT more green (yes, was asked by some project to do;) + - REQ: make NON-STRICT more green (yes, was asked by some project to do;) => td.case_almost - REQ: add notice at top of report overview, explaining diff. beetween PASS, NON-STRICT and FAIL @@ -111,6 +111,8 @@ Misc Cases - server must fail for unmasked client frames + - sending a 2^63 frame. + Closing Handshake Cases ----------------------- @@ -146,6 +148,10 @@ Closing Handshake Cases - when the fuzzer == server, test client timeout on drop TCP after close + - sending close codes 1005 and 1006 : isn't allowed. + + - sending close codes <1000 >=5000 / 1004 is "reserved" + Probably, we need to have a way to instruct the tested peer to iniate a closing handshake to test certain things (like timeouts). @@ -184,6 +190,8 @@ Core WebSocket Protocol + - changes for Hybi-16 .. see also: http://code.google.com/p/pywebsocket/wiki/WebSocketProtocolSpec + - allow FIN = true on beginMessageFrame instead of endMessage - Further optimize masking: http://stackoverflow.com/questions/2119761/simple-python-challenge-fastest-bitwise-xor-on-data-buffers diff --git a/demo/broadcast/broadcast_client.html b/demo/broadcast/broadcast_client.html index d154c3b7..63934061 100644 --- a/demo/broadcast/broadcast_client.html +++ b/demo/broadcast/broadcast_client.html @@ -21,6 +21,6 @@

Autobahn WebSockets Broadcast Demo

- + diff --git a/demo/broadcast/broadcast_client.py b/demo/broadcast/broadcast_client.py new file mode 100644 index 00000000..e56f1ba1 --- /dev/null +++ b/demo/broadcast/broadcast_client.py @@ -0,0 +1,42 @@ +############################################################################### +## +## Copyright 2011 Tavendo GmbH +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +############################################################################### + +import random +from twisted.internet import reactor +from autobahn.websocket import WebSocketClientFactory, WebSocketClientProtocol + + +class BroadcastClientProtocol(WebSocketClientProtocol): + + def sendHello(self): + self.sendMessage("Hello from Python!") + reactor.callLater(random.random()*5, self.sendHello) + + def onOpen(self): + self.sendHello() + + def onMessage(self, msg, binary): + print "Got message: " + msg + + +if __name__ == '__main__': + + factory = WebSocketClientFactory() + factory.protocol = BroadcastClientProtocol + reactor.connectTCP("localhost", 9000, factory) + reactor.run()