Re: [twsocket] Built-in timeout questions

2011-02-07 Thread Anton S.
Thanks Arno, I followed your advices and successfully solved both issues. Regarding timer I'll try ThreadTimer as I don't need precise resolution here -- Anton -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket

Re: [twsocket] Built-in timeout questions

2011-02-02 Thread Arno Garrels
Anton S. wrote: > 2Arno > >> Method DnsLookup doesn't require a custom timeout since the >> underlaying winsock function uses system's DNS lookup timeout. Same >> for Connect with or without DNS name. >> And if method Connect is called with a DNS name it performs a >> blocking DNS lookup while a B

Re: [twsocket] Built-in timeout questions

2011-02-02 Thread Angus Robertson - Magenta Systems Ltd
> Yes, this is blocking DNS lookup which I want to avoid. And I > dislike relying on OS timeouts, maybe it'll be 5 minutes long? There is nothing you can do to speed-up or stop the DNS or connection timeouts, they are specified in the registry. Even if you abort the component on a timer, you can

Re: [twsocket] Built-in timeout questions

2011-02-02 Thread Anton S.
2Arno >Method DnsLookup doesn't require a custom timeout since the underlaying >winsock function uses system's DNS lookup timeout. Same for Connect >with or without DNS name. >And if method Connect is called with a DNS name it performs a blocking >DNS lookup while a Built-In timeout won't trigger

Re: [twsocket] Built-in timeout questions

2011-02-02 Thread Arno Garrels
Anton S. wrote: > 1) In my descendant class I implement true asynchronous Connect with > asynchronous DNS lookup before connecting. Method DnsLookup doesn't require a custom timeout since the underlaying winsock function uses system's DNS lookup timeout. Same for Connect with or without DNS name

Re: [twsocket] Built-in timeout questions

2011-02-02 Thread Anton S.
Regarding accepted sockets: that's how I solved the problem for now: procedure TServer.TriggerClientConnect(Client: TWSocketClient; Error: Word); begin inherited; if Error <> 0 then Exit; with TSrvClient(Client) do begin TimeoutSampling := 1000; TimeoutConnect := InactiveTimeout;

[twsocket] Built-in timeout questions

2011-02-01 Thread Anton S.
Hello all, recently I've started migrating from my own timeout-featured TWSocket descendant towards the ICS built-in timeout. First of all, thanks to Arno for implementing this feature! Usage is quite simple and most of the questions could be answered by reading the code but some things are stil