Stop Processing a Web Connection

Sannyasin Brahmanathaswami brahma at hindu.org
Wed Oct 9 10:27:56 EDT 2019


Charles responded off list, this may be useful to others:

=========

Unfortunately tsNet doesn’t get involved in the browser widget’s network communications, so I can’t help there...

However, the best way to stop UI hangs is to use the tsNet asynchronous (non-blocking) functions so that all network calls happen in the background and let tsNet send a message to the application when the transfer is complete.

While this does require some changes to your application design, it removes any dependancy on a network transfer completing for the application to continue to operate.

You can also use the tsNetCloseConn function with the asynchronous commands to cancel a network transfer in progress.

Hope that helps,

Regards,

Charles


I think I have found a bug in our mobile app…. which is that:

If there is poor bandwidth, say, when the user is trying to get a video in  the browser widget, or the there is a direct call for other resources from our API (images, audio for player, big XML/Json. etc)  the UI hangs. They click a "Go Back" button, but it think that app is trying to (unsuccessufully) process the connection

Now users are typically aware that they have bandwidth issues. For now I don’t want to complicate things by using "tsNetSetTimeouts" to give the user detailed info--maybe in a later version. 

I just want  have them to disconnect as soon as they touch a button, typically a "go back" button.

I keep a TSNET api document at my side. I only  find two options, as soon as the user says in their mind "I going to bail on this" and hit something, should we use:

tsNetclose

tsNetLibUrlReuseConnection false

?

Any other suggestions on the general architecture to address this scenario will also be appreciated.

BR

_______________________________________________
use-livecode mailing list
mailto:use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list