Re: socket.error: [Errno 98] Address already in use

2010-09-21 Thread Nobody
On Mon, 20 Sep 2010 12:00:41 +1200, Lawrence D'Oliveiro wrote: However, some clients choose their own source ports. E.g. rlogin/rsh use privileged (low-numbered) ports, and you can't get the kernel to choose a random privileged port for you. But nobody uses rlogin/rsh any more, They did

Re: socket.error: [Errno 98] Address already in use

2010-09-19 Thread Lawrence D'Oliveiro
In message pan.2010.09.19.05.36.20.141...@nowhere.com, Nobody wrote: On Sun, 19 Sep 2010 12:27:08 +1200, Lawrence D'Oliveiro wrote: That's why Stevens recommends that all TCP servers use the SO_REUSEADDR socket option. I don’t think I’ve ever used that. It seems to defeat a safety

Re: socket.error: [Errno 98] Address already in use

2010-09-19 Thread Nobody
On Sun, 19 Sep 2010 18:42:51 +1200, Lawrence D'Oliveiro wrote: That's why Stevens recommends that all TCP servers use the SO_REUSEADDR socket option. I don’t think I’ve ever used that. It seems to defeat a safety mechanism which was put in for a reason. It was put in for the benefit of

Re: socket.error: [Errno 98] Address already in use

2010-09-19 Thread Lawrence D'Oliveiro
In message pan.2010.09.19.17.19.19.687...@nowhere.com, Nobody wrote: However, some clients choose their own source ports. E.g. rlogin/rsh use privileged (low-numbered) ports, and you can't get the kernel to choose a random privileged port for you. But nobody uses rlogin/rsh any more, and who

Re: socket.error: [Errno 98] Address already in use

2010-09-18 Thread Grant Edwards
On 2010-09-18, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 2f830099-4264-47bc-98ee-31950412a...@q21g2000prm.googlegroups.com, cerr wrote: I get a socket error [Errno 98] Address already in use when i try to open a socket that got closed before with close(). How

Re: socket.error: [Errno 98] Address already in use

2010-09-18 Thread Lawrence D'Oliveiro
In message i72a7a$dr...@reader1.panix.com, Grant Edwards wrote: Even when the connection was properly terminated (from an application's POV), there's a TIME_WAIT period before the TCP stack considered the connection completely gone and will allow re-use of the port. I’m not so sure about

Re: socket.error: [Errno 98] Address already in use

2010-09-18 Thread Jorgen Grahn
On Sat, 2010-09-18, Lawrence D'Oliveiro wrote: In message 2f830099-4264-47bc-98ee-31950412a...@q21g2000prm.googlegroups.com, cerr wrote: I get a socket error [Errno 98] Address already in use when i try to open a socket that got closed before with close(). How come close() doesn't close

Re: socket.error: [Errno 98] Address already in use

2010-09-18 Thread Lawrence D'Oliveiro
In message slrni9aiqt.dlt.grahn+n...@frailea.sa.invalid, Jorgen Grahn wrote: That's why Stevens recommends that all TCP servers use the SO_REUSEADDR socket option. I don’t think I’ve ever used that. It seems to defeat a safety mechanism which was put in for a reason. --

Re: socket.error: [Errno 98] Address already in use

2010-09-18 Thread Nobody
On Sun, 19 Sep 2010 12:27:08 +1200, Lawrence D'Oliveiro wrote: That's why Stevens recommends that all TCP servers use the SO_REUSEADDR socket option. I don’t think I’ve ever used that. It seems to defeat a safety mechanism which was put in for a reason. It was put in for the benefit of

Re: socket.error: [Errno 98] Address already in use

2010-09-17 Thread Lawrence D'Oliveiro
In message 2f830099-4264-47bc-98ee-31950412a...@q21g2000prm.googlegroups.com, cerr wrote: I get a socket error [Errno 98] Address already in use when i try to open a socket that got closed before with close(). How come close() doesn't close the socket properly? The usual case this happens

Re: socket.error: [Errno 98] Address already in use

2010-09-16 Thread cerr
On Sep 15, 5:51 pm, jipalaciosort...@gmail.com jipalaciosort...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El 15/09/2010 20:58, Grant Edwards escribió: On 2010-09-15, cerr ron.egg...@gmail.com wrote: I get a socket error [Errno 98] Address already in use when i

Re: socket.error: [Errno 98] Address already in use

2010-09-16 Thread cerr
message I get looks like: Traceback (most recent call last): File ./checkGPIO.py, line 148, in module main() File ./checkGPIO.py, line 75, in main s.bind((host, port)) File string, line 1, in bind socket.error: [Errno 98] Address already in use Where line 75 contains following: s.bind

Re: socket.error: [Errno 98] Address already in use

2010-09-16 Thread björn lundin
Where line 75 contains following: s.bind((host, port)) As Tomas pointed out, you close conn, but you do not close the server socket 's' /Björn -- http://mail.python.org/mailman/listinfo/python-list

socket.error: [Errno 98] Address already in use

2010-09-15 Thread cerr
Hi There, I get a socket error [Errno 98] Address already in use when i try to open a socket that got closed before with close(). How come close() doesn't close the socket properly? My socket code : s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host, port)) s.listen(1) ...

Re: socket.error: [Errno 98] Address already in use

2010-09-15 Thread Thomas Jollans
On Wednesday 15 September 2010, it occurred to cerr to exclaim: Hi There, I get a socket error [Errno 98] Address already in use when i try to open a socket that got closed before with close(). How come close() doesn't close the socket properly? My socket code : s =

Re: socket.error: [Errno 98] Address already in use

2010-09-15 Thread Grant Edwards
On 2010-09-15, cerr ron.egg...@gmail.com wrote: I get a socket error [Errno 98] Address already in use when i try to open a socket that got closed before with close(). How come close() doesn't close the socket properly? My socket code : s = socket.socket(socket.AF_INET,

Re: socket.error: [Errno 98] Address already in use

2010-09-15 Thread jipalaciosort...@gmail.com
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El 15/09/2010 20:58, Grant Edwards escribió: On 2010-09-15, cerr ron.egg...@gmail.com wrote: I get a socket error [Errno 98] Address already in use when i try to open a socket that got closed before with close(). How come close() doesn't close