[Vm-dev] Re: Socket listening
bert at freudenbergs.de
Tue Jul 1 15:11:21 UTC 2008
Am 01.07.2008 um 17:03 schrieb Ian Piumarta:
> Hi Bert,
> On Jul 1, 2008, at 6:35 AM, Bert Freudenberg wrote:
>> which means the second socket listens successfully, but on a random
>> port. I verified it is actually listening there using lsof. The
>> SO_REUSEADDR option does not make any difference, btw.
>> I think I should not rely on it. Also, the same code gives an error
>> (as expected) on Windows.
> The behaviour you're seeing seems broken to me; bind() should fail
> if another socket is already bound to the same listening address.
> I'll take a look.
In the mean time I found that the new SocketAddressInfo-based code
actually gives an error when binding, as expected. Only the old
primitiveSocketListenWithOrWithoutBacklog silently binds to a random
- Bert -
More information about the Vm-dev