from twisted.internet.defer import Deferred
from xmlrpclib import loads, dumps
+import socket
USER_AGENT = 'Python/Twisted XMLRPC 0.1'
class XMLRPCClient(HTTPClient):
print "response decode error: " + `e`
self.d.errback()
else:
- l = []
- for i in args:
- l.append(i)
- l.append({'host' : self.transport.getHost()[1]})
- apply(self.d.callback, (l,))
+ apply(self.d.callback, args)
class XMLRPCClientFactory(ClientFactory):
def __init__(self, method, args, callback=None, errback=None):
self.d.addCallback(callback)
if errback:
self.d.addErrback(errback)
-
+ self.noisy = 0
+
def buildProtocol(self, addr):
prot = XMLRPCClient()
prot.method = self.method