Is it possible to set the clientport for the xmlrpc-connection?
I want to say:
Client should make a ServerProxy-object to over a specific client port
or pseudocode something like this:
serv = xmlrpclib.ServerProxy("server:port","overSpecificClientPort").
There is no option for this in module xmlrpclib, but you can create your own by modifying the original version. Assuming you use Linux, fetch
/usr/lib/python2.7/xmlrpclib.py
. Modify the methodmake_connection
accordingly.Providing a parameter
source_address
toHTTPConnection
is supported by httplib not before Python version 2.7.Have fun!
Try to define a custom transport. This should be something like that:
EDIT: bug fix httplib.HTTP => httplib.HTTPConnection
And checked that it works, in python 2.7 (but not before)