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 / CreateHTTPConnection Question

Author
Message
Abiz
12
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 7th Mar 2017 20:05
If I communicate only with 1 website, is there a need to create this connection every time I do an Async request, or can I keep it open for the duration of my program?

Both methods work, but I want the find what the recommended / best practice is, so my program doesn't crash on iOS or Android later.....

Thanks for your help
James
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 8th Mar 2017 09:22
I believe you can create multiple connections, as you store the request id in a variable to be used later when actually sending/receiving data.


tl:dr, you can keep it open for the duration of your program.
Signature removed by mod because it's larger than 600x120... please resize and try again.
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 8th Mar 2017 09:33
Although I encountered differences between platforms.

In some cases the downloads would fail on Android if I didn't close the connection and re-open it each time, iOS/Windows/Mac didn't need this.

Login to post a reply

Server time is: 2024-11-24 19:25:59
Your offset time is: 2024-11-24 19:25:59