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

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Sep 19 08:42:51 CEST 2010

In message <pan.2010. at>, 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 mechanism
>> which was put in for a reason.
> It was put in for the benefit of clients, to prevent them from selecting
> a port which they won't be able to use.

But clients typically don’t care what port they use—they let the system pick 
a port for them, so this kind of option is unnecessary.

More information about the Python-list mailing list