Replies: 6 comments 2 replies
-
By trying to download something, there is no other way, what are you allowed to do depends on many things, for example "connection optimizers" like RedPort can filter what resources are available over HTTP very strictly. |
Beta Was this translation helpful? Give feedback.
-
Not an issue but a question. Converting to discussion. |
Beta Was this translation helpful? Give feedback.
-
Still hoping for some solution to this. There are various OCPN functions (e,g, plugin downloading tide table) that need to be truly on-line and not just connected to a local network. If you try to update the plugin catalogue when on a lovcal network, OCPN takes an awful long time to get over it. |
Beta Was this translation helpful? Give feedback.
-
On Windows you can use the INetworkListManager interface. One of it's methods indicates whether you have an Internet connection. I've no idea of equivalent functions for Linux or MacOS. |
Beta Was this translation helpful? Give feedback.
-
As @nohal pointed out, just having an internet connection is not enough, there can be all sorts of download problems even if the host is "connected". That is, truly online is not really a well defined concept in this context. The awful long time required to get over a failed download is probably a TCP timeout which indeed can be long, 1 minute on Linux IIRC. A more robust solution might be to just add a shorter timeout to for example catalog or tide table downloads. Should not be that complicated, platform independent and handling all sorts of download issues. |
Beta Was this translation helpful? Give feedback.
-
I am presently on-line typing this but |
Beta Was this translation helpful? Give feedback.
-
How can a plugin test if OCPN really is on-line?
The API
OCPN_isOnline
looks like what is needed but I find it returns true if connected to anything, including an on-board network that goes nowhere.So my plugin thinks it is on-line and tries to download a file from the internet and then a dialogue is displayed allowing the user to abort.
But what is needed is to be able to work out if we are connected to the internet and not just a local network.
How best to do this?
Beta Was this translation helpful? Give feedback.
All reactions