Funny xmlrpc / linux problem
jeff at jmcneil.net
Tue Jun 16 13:33:57 EDT 2009
On Jun 16, 12:51 pm, Hans Müller <HeinT... at web.de> wrote:
> thanks a lot for your hint, that was completely new for me.
> Nagle's optimisation is definitely a good idea in most cases.
> By the way, do you have an idea how to access the underlying socket to modify the behavier
> via the setsockopt function to disable Nagle's algorythm in my special case (i need speed for small
> packets) ?
> Thanks a lot
Something like this ought to work. SimpleXMLRPCServer uses
SocketServer.TCPServer to handle all of the network-layer stuff. Also,
ironically, see http://bugs.python.org/issue6192.
from SimpleXMLRPCServer import SimpleXMLRPCServer
socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s = MyXMLServer(('127.0.0.1', 8080))
print s.socket.getsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY)
More information about the Python-list