> Hello!
> Using HTTPCLI AsyncGET how main thread wait for the Async to download the
> html code.
> Code relies on input html code. If i sleep the main ui thread it will
> become frozen.
> I know how to get HTML with Async via Events but i have no idea how program
> it so that Main UI thread
> will wait and then continue.. :)


use a timer. The HTML fetches your stuff async and stores it somewhere
and sets some "get was successfull" flag.

Timer runs with say 50ms and checks that flag until either it's
signalling ok or a timeout has elapsed. For the timeout you can fetch
system time at the point where you start the timer and compare with
current time in your OnTimer. On timeout present a nice error message or

That's a basic but workable sheme for this. For more complex things it
can be extended into a state machine.


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