> I have several instances (More than 20) of TWSocket (TCP Client),
> running all on the same thread (Secondary thread, not main thread). 
> Each instance will connect to a different DNS address from
> Sometimes, several addresses are offline, or even the internet
> connection is not available, when we try to connect it locks up the
> thread for several seconds, and consequently all instances will lock
> up too, maybe something related to DNS lookup.

The thread should not block, method DnsLookup internaly calls Win API
WSAAsyncGetHostByName which is an asynchronous function, however 
WSAAsyncGetHostByName does not resolve multiple requests concurrently.
So multiple calls to DnsLookup from the same thread context are 

Arno Garrels
To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to