« Return to Thread: socket woes

Re: Re: socket woes

by Ivan Warren :: Rate this Message:

Reply to Author | View in Thread

kerravon86 wrote:

> --- In hercules-390@..., "kerravon86" <kerravon86@...> wrote:
>  
>> I tried forcing an unusual amount of time in order
>> to get a hard error.
>>    
>
> New idea - I tried doing the same operation in a loop.
>
> last 10049
>  
Ok.. You're right.. The locking won't help here.. and it's actually
unnecessary. I misinterpreted what a bind to port 0 meant. A bind to
port 0 on an unicast address (that is not IPADDR_ANY) assigns a random
available port, so we shouldn't have any concurrency problem after all.

Now, I'm having a hard time figuring from your debug messages WHICH of
the calls is failing (bind, listen, connect or accept) with the
WSAEADDRNOTAVAIL error..

What could be helpful would be to obtain the raw contents of the
localhost_addr structure and the actual call that failed when you hit a
10049 error.

--Ivan






[Non-text portions of this message have been removed]

 « Return to Thread: socket woes