Make xmlrpc client non-blocking

This commit is contained in:
Dan Williams 2006-06-15 17:03:20 -04:00
parent 1b611fc842
commit 465c49179c

View File

@ -123,6 +123,9 @@ class GlibXMLRPCServer(GlibTCPServer, SimpleXMLRPCServer.SimpleXMLRPCDispatcher)
class GlibHTTP(httplib.HTTP):
"""Subclass HTTP so we can return it's connection class' socket."""
def connect(self, host=None, port=None):
httplib.HTTP.connect(self, host, port)
self._conn.sock.setblocking(0)
def get_sock(self):
return self._conn.sock