when to close a socket?

Terry Judd tsj at unimelb.edu.au
Wed Feb 29 13:13:01 EST 2012


On 29/02/2012, at 11:33 PM, Bjoernke von Gierke wrote:

If you're using libURL, then that one should close the sockets for you, and amassing of unclosed sockets would be a bug in there. On the other hand, if you made the sockets yourself from scratch, they're not closed (note that the remote host might and will close sockets, depending on implementation of the server/client on the other end). If things go weird with slow downs as you described, try to query "the opensockets", and if you got a gazillion entries, then you know why you got slow downs and weird stuff happening ;)

Hi Bjoernke - I'm just using Livecode's post command for the problematic transactions. I've been following their progress (libURLSetLogFIeld) and the sockets generally close themselves but sometimes they are reused if they are still open. Hopefully Dave's httpheaders suggestion will help here.

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