Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for IP Connection
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00773323
Message ID:
00792934
Views:
49
>Also, it took between 14 and 16 seconds on average to return a positive result and 26 seconds to return an error. Is there any faster way to determine if you have internet access?

Most reliable way is to actually hit a link and fail immediately if there's no connection...

You can do this with WinInet pretty easily especially if you set up a timeout for requests...

If you're offline the failure should be immediately, if you're on a network though, but not online determining that you're not online can take a few seconds...

This is why it's difficult for any API to tell you whether you're online or not, because what does online constitute? On the company network? On the company intranet? On the Internet?

To an API all that stuff is the same thing... unless you hit a specific location which would fail if DNS looksups can't be made and fail pretty quickly.


wwIPStuff includes a method in the wwHTTP class called HTTPPing() which basically goes this route and it's reliable and fast when no connection can be made.


+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform