modifié: superTornado.py

modifié:         test.html
This commit is contained in:
sidya82 2014-02-28 06:32:44 +01:00
parent b5c1a76298
commit d0370419e8
2 changed files with 3 additions and 8 deletions

View File

@ -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"

View File

@ -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);*/
</script>
</head>
<body>