HISE Logo Forum
    • Categories
    • Register
    • Login

    [feature request] Network connectivity checker

    Scheduled Pinned Locked Moved Feature Requests
    1 Posts 1 Posters 78 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by d.healey

      Currently we can use Server.isOnline() to see if there is an internet connection. This works by pinging google's server and seeing if it gets a result. It's a basic solution to the problem but not ideal. For example I've had users in China behind the great firewall who are able to connect to my server but not Google's. I've also had other users who have a slow connection and have to wait quite a while for the check to return, and in the meantime it looks like my plugin's just hanging or frozen.

      A better solution is to ask the OS if there is currently an active network connection.

      After googling the problem it seems another JUCE user has already come up with a way to do it.

      @Christoph-Hart If you think this is good and when you have time, could you implement it, and perhaps add a broadcaster too?

      Link Preview Image
      squarepine_core/modules/squarepine_core/networking/NetworkConnectivityChecker.h at main · SquarePine/squarepine_core

      Exceptional JUCE/C++ modules that accelerate app and plugin development. - squarepine_core/modules/squarepine_core/networking/NetworkConnectivityChecker.h at main · SquarePine/squarepine_core

      favicon

      GitHub (github.com)

      Additionally this also tells us the type of connection the system is using. This is nice because we can give the user the option of only downloading large files when not using mobile data for example.

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 5
      • First post
        Last post

      21

      Online

      1.7k

      Users

      11.8k

      Topics

      102.6k

      Posts