xmlrpc tutorial?

Carsten Gaebler clpy at snakefarm.org
Fri Nov 30 17:45:23 CET 2001


talon at www.tempestnetworks.net wrote:
> 
> On Fri, 30 Nov 2001 15:22:21 +0100, Carsten Gaebler <clpy at snakefarm.org> wrote:
>
> >However, there seems to be a problem with restarting the server. I
> >have to wait a minute or so to avoid an 'address is already in use'
> >error.
> 
> Use the setsockopt function on the socket objet, pass it the value
> SO_REUSEADDR (defined in the socket module).

Nope, doesn't help. My code is:

server = SocketServer.TCPServer(('', 8000), TestRequestHandler)
server.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.serve_forever()

cg.
-- 
'In iteger arithetric divsion is no the oposite of multiplication.'
                                   -- scenes from comp.lang.python



More information about the Python-list mailing list