Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use')

2009-02-02 Thread Hendrik van Rooyen
"Steve Holden" wrote: > > My previous reply assumed you are running some UNIX-like operating > system. If you are on Windows then Jean-Paul's advice stands, as Windows > *does* allow several processes to listen on the same port and randomly > delivers incoming connections to one of the listenin

Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use')

2009-01-27 Thread Hendrik van Rooyen
"Laszlo Nagy" wrote: > I have a program that uses socket.bind() and socket.listen() frequently. > After that program stops, it is not able to bind() again for a while: > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) This does t