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

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Sep 19 20:00:41 EDT 2010


In message <pan.2010.09.19.17.19.19.687000 at 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 would attach any trustworthy 
meaning to a connection coming from a remote low-numbered source port?

> If you're writing a server which listens on a known port, you *should* be
> using SO_REUSEADDR to avoid unnecessary delays in start-up. The kernel
> will automatically reject packets relating to stale connections, and your
> server should be accepting any new connections ASAP.

That makes it sound like SO_REUSEADDR should really be a superfluous option. 
But it’s not.



More information about the Python-list mailing list