Skip to content
Snippets Groups Projects
Commit b0fa0aaa authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Use StreamRequestHandler.

parent 3e0020e4
No related branches found
No related tags found
No related merge requests found
......@@ -126,10 +126,9 @@ class Irker:
for session in self.sessions.values():
session.await()
class MyTCPHandler(SocketServer.BaseRequestHandler):
class MyTCPHandler(SocketServer.StreamRequestHandler):
def handle(self):
# self.request is the TCP socket connected to the client
irker.handle(self.request.recv(1024).strip())
irker.handle(self.rfile.readline().strip())
if __name__ == '__main__':
host = HOST
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment