[Twisted-Python] Socket bind and re-bind problems
Brett Viren
bv at bnl.gov
Tue Aug 9 13:56:54 EDT 2005
Gaballo Luca <luca.gaballo at rd.francetelecom.com> writes:
> socket.error: (98, 'Address already in use')
The pure Python TCPServer and UDPServer classes have a class variable
"allow_reuse_address". Set to "True" will allow quick re-binding. It
needs to be set before any server instances are created. For example
I use this bit of code in some non-Twisted XML-RPC server code:
from SimpleXMLRPCServer import *
SimpleXMLRPCServer.allow_reuse_address = True
However, I don't know if your Twisted based server ultimately inherits
from one of these classes.
-Brett.
More information about the Twisted-Python
mailing list