modifié: superTornado.py
This commit is contained in:
parent
b62afa11aa
commit
d635b6f1c3
@ -250,8 +250,15 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
|||||||
temp = open("temp","w")
|
temp = open("temp","w")
|
||||||
socket.setdefaulttimeout(5)
|
socket.setdefaulttimeout(5)
|
||||||
f = urlopen(GlobalVars.urlCamera)
|
f = urlopen(GlobalVars.urlCamera)
|
||||||
data = f.read()
|
isData = False
|
||||||
|
for ligne in f:
|
||||||
|
data = ligne.rstrip('\r\n')
|
||||||
|
if isData == True:
|
||||||
temp.write(data)
|
temp.write(data)
|
||||||
|
if data == "ENDSECTIONEVENT" :
|
||||||
|
isData = True
|
||||||
|
data = f.read()
|
||||||
|
|
||||||
encoded = base64.b64encode(data)
|
encoded = base64.b64encode(data)
|
||||||
f.close()
|
f.close()
|
||||||
self.write_message(encoded)
|
self.write_message(encoded)
|
||||||
|
Reference in New Issue
Block a user