modifié: superTornado.py

modifié:         v/video.html
This commit is contained in:
sidya82 2014-03-02 21:14:50 +01:00
parent bbd59adfde
commit 19d6c72378
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
def send_image(self) : def send_image(self) :
try : try :
socket.setdefaulttimeout(5) socket.setdefaulttimeout(5)
f = urlopen('http://test:a@192.168.0.13/image.jpg?cidx=791836195') f = urlopen('http://test:a@192.168.1.13/image.jpg?cidx=791836195')
data = f.read() data = f.read()
encoded = base64.b64encode(data) encoded = base64.b64encode(data)
self.write_message(encoded) self.write_message(encoded)

View File

@ -6,7 +6,7 @@
<title>Acces camera</title> <title>Acces camera</title>
<script src="js/jquery-2.1.0.min.js"></script> <script src="js/jquery-2.1.0.min.js"></script>
<script > <script >
var ws = new WebSocket ("ws://192.168.1.23/socket"); var ws = new WebSocket ("ws://192.168.1.12/socket");
ws.onmessage = function (evt) { ws.onmessage = function (evt) {
console.log("data receive"); console.log("data receive");
if(evt.data != "error") { if(evt.data != "error") {