Re: [twsocket] DNS Problem

2010-08-09 Thread Arno Garrels
Eric Fleming Bonilha wrote: >> Yes, it is safe, however I would consider to use >> WSocket_gethostbyname as well (more work). >> > > What is the differenc? I See that wsocket_gethostbyname returns more > information, but is there a reason to use it instead of the other > method? WSocket_Synchro

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Yes, it is safe, however I would consider to use WSocket_gethostbyname as well (more work). What is the differenc? I See that wsocket_gethostbyname returns more information, but is there a reason to use it instead of the other method? Thanks Eric -- To unsubscribe or change your settings

Re: [twsocket] DNS Problem

2010-08-09 Thread Arno Garrels
Eric, >> Sorry I misunderstood. I thought you used method DnsLookup. >> So in this case it is simple to fix, call method DnsLookup and >> connect with a dotted IP address from the OnDnsLookupDone event >> handler. >> > > Hi Arno > > Thanks for the clarification > > So, if I use the method Dns

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Sorry I misunderstood. I thought you used method DnsLookup. So in this case it is simple to fix, call method DnsLookup and connect with a dotted IP address from the OnDnsLookupDone event handler. Hi Arno Thanks for the clarification So, if I use the method DnsLookup all the requests will be s

Re: [twsocket] DNS Problem

2010-08-09 Thread Arno Garrels
Eric, >> Correct, the calling thread won't be blocked. >> > > Arno, > > 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 o

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Correct, the calling thread won't be blocked. Arno, 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

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Correct, the calling thread won't be blocked. Arno, I´m having a problem with a customer, and I sucessfully reproduced the same problem here. I really believe that it is related to DNS Lookup. Here is what is happening: - I have a communication thread that spawns all TCP client sockets, s

Re: [twsocket] DNS Problem

2010-08-09 Thread Arno Garrels
Eric Fleming Bonilha wrote: >> Arno Garrels wrote: >> >>> So multiple calls to DnsLookup from the same thread context are >>> serialized. >> >> In other words, DnsLookup always returns immediately, however >> Win32 API WSAAsyncGetHostByName serializes multiple requests from >> the same thread con

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Arno Garrels wrote: So multiple calls to DnsLookup from the same thread context are serialized. In other words, DnsLookup always returns immediately, however Win32 API WSAAsyncGetHostByName serializes multiple requests from the same thread context internally. This may trigger OnDnsLookupDone

Re: [twsocket] DNS Problem

2010-08-07 Thread Arno Garrels
Arno Garrels wrote: > So multiple calls to DnsLookup from the same thread context are > serialized. In other words, DnsLookup always returns immediately, however Win32 API WSAAsyncGetHostByName serializes multiple requests from the same thread context internally. This may trigger OnDnsLookupDon

Re: [twsocket] DNS Problem

2010-08-07 Thread Arno Garrels
Eric, > 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 dyndns.org > > Sometimes, several addresses are offline, or even the internet > connect

[twsocket] DNS Problem

2010-08-06 Thread Eric Fleming Bonilha
Hello all I believe I have posted the same question some years ago but I can´t remember and find it What could cause the following thing: 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 co