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] Detecting POP3 protocol state and disconnecting

2010-08-09 Thread Arno Garrels
Zvone wrote: > A few POP3 related questions... > > 1. How am I supposed to detect when POP3 component has disconnected or > what state is it in? OnSessionClosed is the event to initiate a reconnect delayed (see below). > OnSessionClosed appears to trigger BEFORE it disconnects but after > QUIT

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

[twsocket] Detecting POP3 protocol state and disconnecting

2010-08-09 Thread Zvone
A few POP3 related questions... 1. How am I supposed to detect when POP3 component has disconnected or what state is it in? OnSessionClosed appears to trigger BEFORE it disconnects but after QUIT is sent (not logical for me, should be the last one to trigger) and what seems to trigger at the disc

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-09 Thread Arno Garrels
Bjørnar Nielsen wrote: > Arno, > >> ... try the following code and let me know how it works for you, > > The code works for me. But should not the first overload directive > be inside the conditional define? Yes, it's better inside, corrected. Just updated the svn repository. -- Arno Garrels

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-09 Thread Bjørnar Nielsen
Arno, > ... try the following code and let me know how it works for you, The code works for me. But should not the first overload directive be inside the conditional define? Regards Bjørnar -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org