Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test Internet connection
Message
From
25/01/2011 15:41:16
 
 
To
25/01/2011 14:12:45
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01497336
Message ID:
01497386
Views:
60
>>But if there are other problems (eg invalid gateway or router info) then InternetOpenUrl() can take a minute ot so to fail.
>>For my purposes I'd be quite happy to give up if a valid connection wasn't obtained in, say, 5 seconds.
>
>This is one of the best examples of useful multi-threading (or the substitutes necessary in vfp single thread...). If this is the only MT task, I'd go for a simple check in separate process writing out a file and loop with sleep-calls (or ww, as they also induce vfp-wait states) for 5s or the file is created. KISS is not always bad...

You lost me. I know that if this was .Net I could hive the process off onto a separate thread - but I'd still have to wait for the result.
Bottom line is that I'm happy to accept that if no Internet access can be confirmed in five or ten seconds then it is not available.
I'm also not worried about maintaining any type of user interactivity whilst the check is in progress so single-threading is not a problem.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform