Process Multiple calls via TCPSocket or URLConnection advice


No idea if there are issues as well on OSX with the tcp sockets or only on windows, and from what I see URLConnection is more stable.

The process is similar to outlook, or to a mail client.

I need to connect to a soap API , to fetch the message id’s ,
to check each message details based on the message id and see if it is in the local database or not

If not to parse it and store it and then validate on the api side that the message was processed and dismiss it .

Any idea what would be the best way to do this ? there is no user interaction and I have a 10 min fetch time on the api end point side . so me I have to do in this time all the processing and then wait for another 10 min to get the next batch. I was thinking to a timer with a thread on the main window as some details have to be activated in order to start processing.

So far I did a timer that fires every 3 min and starts the thread and some methods that do the fetching and the processing , but unfortunately I’m stuck on the processing part as I wanted to reuse the socket, I guess I will have to put 3 sockets for each task and doit there or use some handlers to see when the data was received and start processing and put on pause the rest of the tasks. I guess is not the best workflow but so far this is what I get.

Any advices are welcomed.


Don’t reuse the sockets but make new ones. I had an array of sockets for downloading. Every time one socket finished it sent a notification to the socket manager and made a new socket. Unfortunately, I got some crashes. So I’m now using CurlMulti from the MBS plugin. This also crashes on the §$%& AutoReleasePool. But the crashes are rare.

Thanks for advice,

I wish I could be able to create dynamic async sockets and process data on the go and then dismiss them , but I’ll try to look as well on URLConnection and see what I get there. Unfortunately in some certain points I do need Xojo.Net.HTTPSocket for that .