Correct, the calling thread won't be blocked.


I have checked the ICS code, and I found this:

OverbyteIcsWSocket.pas on line 7290 (TCustomWSocket.Connect)

       if not FAddrResolved then begin
           { The next line will trigger an exception in case of failure }
sin.sin_addr.s_addr := WSocket_Synchronized_ResolveHost(AnsiString(FAddrStr)).s_addr;
           FAddrResolved := TRUE;

So, when I first call connect, it will try to resolve the host by using WSocket_Synchronized_ResolveHost

This is a sync routine, it just quits when it resolves, and in that case, the thread will be blocked until the address is resolved.

That is the problem that I´m having, because on my customer site it takes 2 seconds to resolve the ip address, and during this time, all TCP communications are dead, because the .Connect method is called from the communication thread context

Am I using an old version of ICS? I´m using version 7 with D2010.

If this is the right way of ICS working, then I think I have to make a DNS lookup thread

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

Reply via email to