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

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


In message <pan.2010.09.19.05.36.20.141000 at 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 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