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

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 --

[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

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] 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 is

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 context internally.

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,

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 }

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 of

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

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 DnsLookup all the

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

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?