Update runtime files
This commit is contained in:
@ -62,9 +62,16 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
|
||||
if decoded[0] >= 0:
|
||||
if decoded[1] == 'hello!':
|
||||
response = "got it"
|
||||
id = decoded[0]
|
||||
elif decoded[1] == 'hello channel!':
|
||||
response = "got that"
|
||||
# response is not to a specific message callback but to the
|
||||
# channel callback, need to use ID zero
|
||||
id = 0
|
||||
else:
|
||||
response = "what?"
|
||||
encoded = json.dumps([decoded[0], response])
|
||||
id = decoded[0]
|
||||
encoded = json.dumps([id, response])
|
||||
print("sending {0}".format(encoded))
|
||||
self.request.sendall(encoded.encode('utf-8'))
|
||||
thesocket = None
|
||||
|
||||
Reference in New Issue
Block a user