Re: 'Address already in use' when using socket

2005-04-08 Thread J Berends
Peter Hansen wrote: Bearish wrote: I get 'Address already in use' errors when using sockets. Generally one can fix this using: sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) where "sock" is the server socket in question. Do this prior to attempting to bind to the port. -Peter I agree

Re: 'Address already in use' when using socket

2005-04-07 Thread Peter Hansen
Bearish wrote: I get 'Address already in use' errors when using sockets. Generally one can fix this using: sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) where "sock" is the server socket in question. Do this prior to attempting to bind to the port. -Peter -- http://mail.python.org/mai

'Address already in use' when using socket

2005-04-07 Thread Bearish
I get 'Address already in use' errors when using sockets. Am I properly shutting down all connections? What am I doing wrong? I've looked at the examples and I can't figure out what I'm missing. I already read the Python Socket HOWTO at http://py-howto.sourceforge.net/sockets/sockets.html but I see