You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to make the following change (Python 3.9) to make this code work.
@@ -90,13 +90,13 @@ class RpcHandler(SocketServer.BaseRequestHandler):
"""This function is called automatically by the SocketServer"""
# self.request is the TCP socket connected to the client
# read the incoming command
request = self.request.recv(1024).strip()
request = self.request.recv(1024).decode().strip()
# write to the queue waiting to be processed by the server
INPUT_QUEUE.put(request)
# wait for the server answer in the output queue
response = OUTPUT_QUEUE.get(timeout=5.0)
# send back the answer
self.request.send(response)
self.request.send(response.encode())
The text was updated successfully, but these errors were encountered:
I needed to make the following change (Python 3.9) to make this code work.
@@ -90,13 +90,13 @@ class RpcHandler(SocketServer.BaseRequestHandler):
"""This function is called automatically by the SocketServer"""
# self.request is the TCP socket connected to the client
# read the incoming command
The text was updated successfully, but these errors were encountered: