projects
/
irker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e0020e
)
Use StreamRequestHandler.
author
Eric S. Raymond
<esr@thyrsus.com>
Sun, 26 Aug 2012 17:54:16 +0000
(13:54 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Sun, 26 Aug 2012 17:54:16 +0000
(13:54 -0400)
irker.py
patch
|
blob
|
history
diff --git
a/irker.py
b/irker.py
index 12e1da39aa2c1e4a918591d69014dc77327124c5..450b738c835d8f4a19142e8690614ebd590d9259 100755
(executable)
--- a/
irker.py
+++ b/
irker.py
@@
-126,10
+126,9
@@
class Irker:
for session in self.sessions.values():
session.await()
-class MyTCPHandler(SocketServer.
Base
RequestHandler):
+class MyTCPHandler(SocketServer.
Stream
RequestHandler):
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