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);*/