locked
Knowning that machine is offline

    Question

  • Is there an API to find out that the machine is offline to save your app the trouble of doing XHRs that are going to fail anyway? Better yet are there notifications for online/offline transitions?
    Saturday, September 17, 2011 2:37 PM

Answers

  • You can look at the NetworkInformation -- documentation is at http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.connectivity.networkinformation(v=VS.85).aspx

    (Windows.Networking.Connectivity.NetworkInformation)

    There's an event, "networkstatuschanged" that lets you know when the network has changed (e.g., you've docked or turned on WiFi or...), BUT that won't tell you about upstream events (e.g., your server was rebooting)

    • Marked as answer by Ghostrider-13 Monday, September 19, 2011 5:07 AM
    Sunday, September 18, 2011 5:17 PM