> But I can see wsoAsyncDnsLookup making new applications easier by
> avoiding needing to code OnDnsLookupDone.

Just tried using wsoAsyncDnsLookup in a new component, and discovered a
flaw in the implementation.  

Currently wsocket State is not changed when the DNS lookup starts, so
it remains wsClosed, and applications are not aware it's happening, and
it may take several seconds, or longer.  So there is a risk of a second
connect attempt. 

There is FInternalDnsActive flag which could be published and checked,
or we could add a new State wsDnsLookup which would be easier to use
since mostly we check for not wsClosed.  

But I'm always reluctant to change long defined stuff in case someone
is checking for State >= wsClosed for instance, not a good design
generally since it assumes the type has an order.

So which change is safer? 

Angus



-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to