Update runtime files

This commit is contained in:
Bram Moolenaar
2021-12-05 21:54:04 +00:00
parent 12f3c1b77f
commit 4700398e38
27 changed files with 223 additions and 113 deletions

View File

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