when to close a socket?

Terry Judd tsj at unimelb.edu.au
Wed Feb 29 04:49:41 EST 2012


Hi guys - we have a reasonably complex Livecode app that makes lots of server requests - typically initiated by posting data to php routines on a secure (https) server.  Generally things work well but occasionally things go awry and we start seeing slowdowns and odd errors (including the dreaded 'previous request not completed'), particularly if a number of requests are made in relatively quick succession.

Anyway, I was wondering whether there was any advantage to closing the open socket as soon as any data is returned rather than waiting for it close itself (there is a timeout interval of 5 seconds), thereby forcing any new request to open a new socket rather than using an 'old' open one?

We've got around 1200 regular users (students and staff) on this system now and I'm keen to improve the reliability of the network side of things in any way that I can.

Terry...

Dr Terry Judd
Senior Lecturer in Medical Education
Medical Eduction Unit
Faculty of Medicine, Dentistry & Health Sciences
The University of Melbourne






More information about the use-livecode mailing list