#NEWLINE# def callRemote( self , method , * args ) : #NEWLINE# #INDENT# '\n        Call remote XML-RPC C{method} with given arguments.\n\n        @return: a L{defer.Deferred} that will fire with the method response,\n            or a failure if the method failed. Generally, the failure type will\n            be L{Fault}, but you can also have an C{IndexError} on some buggy\n            servers giving empty responses.\n\n            If the deferred is cancelled before the request completes, the\n            connection is closed and the deferred will fire with a\n            L{defer.CancelledError}.\n        ' #NEWLINE# def cancel( d ) : #NEWLINE# #INDENT# factory . deferred = None #NEWLINE# connector . disconnect ( ) #NEWLINE# #UNINDENT# factory = self . queryFactory ( self . path , self . host , method , self . user , self . password , self . allowNone , args , cancel , self . useDateTime ) #NEWLINE# if connector . secure : #NEWLINE# #INDENT# from twisted.internet import ssl #NEWLINE# connector = self . _reactor . connectSSL ( nativeString ( self . host ) , ( self . port or 443 ) , factory , ssl . ClientContextFactory ( ) , timeout = self . connectTimeout ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# connector = self . _reactor . connectTCP ( nativeString ( self . host ) , ( self . port or 80 ) , factory , timeout = self . connectTimeout ) #NEWLINE# #UNINDENT# return factory . deferred