From d0370419e8a544fbf835b4803db885d587db07cd Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 06:32:44 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20test.h?= =?UTF-8?q?tml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 5 +++-- test.html | 6 ------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/superTornado.py b/superTornado.py index 9609694..34e3df0 100644 --- a/superTornado.py +++ b/superTornado.py @@ -108,8 +108,6 @@ class DisconnectionHandler(BaseHandler): class TestSocket(tornado.websocket.WebSocketHandler): def open(self) : print "->Websocket opened" - - def on_message(self,mesg): print '->lol' try : f = urlopen('http://test:a@192.168.1.15/image.jpg?cidx=791836195') @@ -119,6 +117,9 @@ class TestSocket(tornado.websocket.WebSocketHandler): except Exception, e : self.writemessage("") + def on_message(self,mesg): + pass + def on_close(self): print "->Websocket closed" diff --git a/test.html b/test.html index dac35a5..7a6c823 100644 --- a/test.html +++ b/test.html @@ -17,12 +17,6 @@ ws.onclose = function () { console.log("connection closed"); }; - /* function refresh() {*/ - console.log("send data"); - ws.send("next"); - //} - /*$(document).ready(refresh()) - setInterval(refresh(), 2000);*/