Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How does GetInternetState() actually work?

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 1st Jan 2014 23:47
I use this function before I attempt to connect to a website.
However, some testers report hangs / long delays (minutes even) when this is used.

How / what is it doing under the hood?

easter bunny
12
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 1st Jan 2014 23:48 Edited at: 2nd Jan 2014 00:01
I don't know for sure...
It most likely connects to some predefined server. I'll fire up wireshark and get the answer back to you soon

EDIT: Wireshark didn't help

Kobaltic
12
Years of Service
User Offline
Joined: 24th Jan 2012
Location: PA, USA
Posted: 2nd Jan 2014 00:35
I have never used it to connect to a website. Not sure what it is for.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 2nd Jan 2014 16:06
hmm i whould expect a yes/no without delay.
if u use 108 19 maybe post it to the issue list.
http://code.google.com/p/agk/issues/list

AGK 108 B19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jan 2014 16:23
What are the devices used by the testers who have delays (model and Android version)?

How are there devices connected to the internet?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 2nd Jan 2014 18:54 Edited at: 2nd Jan 2014 18:55
It's all PC.
Mixture of OS (XP, Win 7 and 8)

It is 108.19, but I understand v1 is finished with now?

[edit] I'll try without it and just go for the website.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jan 2014 20:03
v10819 is the final release for V1. As I understand it, unless a catastrophic bug is found no further changes will be made to v108.

I have had no issues with Windows 7 using the command GetInternetState. And no issues on my Mac Mini or any of my iOS and Android devices.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 2nd Jan 2014 22:04
I call GetInternetState quite liberally and it has never caused any delay issue in Windows, iOS, or Android.
I believe your delays lie elsewhere. Are you using HTTPRequestAsync or HTTPRequest? Async will allow you to do other things in the app while waiting on the response.

Show us some of your code and maybe we can help further.

nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 2nd Jan 2014 23:12 Edited at: 2nd Jan 2014 23:15
Me too. I don't have any problems with it and I tested it by dropping internet connection and it works fine for me.

One of the things I did early on when this was first reported was to make a simple program which ONLY called GetInternetState() and gave to people who had the issue, so can't really be any more specific than this.

I am not using async (but it doesn't matter because the freeze occurs on GetInternetState() not on HTTPRequest (which times out correctly if needed).

It was a casual question, because I was going to take the GetInternetState() call out of the code, because only about 2 people in 100+ testers are getting this issue - one of which seemed to be only on wireless and OK on wired, so I was just wondering.

Still, I've found many issues I've had to work around because a tester finds something that only seems to happen on their PC setup and no-one else does.. this seems to be one of those things?

[edit] I only wanted to use it to inform the user if they had an issue with their own connection to differentiate from a problem on the web server.

Login to post a reply

Server time is: 2024-11-24 23:20:00
Your offset time is: 2024-11-24 23:20:00