reusing xojo.net.httpsocket

You want to treat the new socket (which is asynchronous) as synchronous so that you don’t start the next thing until the last thing is complete.

Hi Bob,

do you have an example of this ?

Thanks

Tim

Sorry, I don’t have one readily available. This was, after all, over a year ago when I posted this.

Thanks for this explanation. After some hours of debugging the same problem with reusing xojo.net.httpsocket yesterday I found the solution in this short explanation. Finally worked around with a timer too.

Shouldn’t there be a note on this in the docs? Or am I missing it?

Hi
I have a big file and I have to split it to chunks and upload each 10 chunks asynchronously.
I tried to use asynchronously way from httpsocket

But just the last request has been received as it overwrites any previous requests.
if i have to add a flag in PageReceived to enable the next request it doesn’t become asynchronous.
So what is the best solution?

Thanks for help.

What is your code like? It should be that you initiate the first chunk, then in PageReceived, you initiate (via Timer) then next chunk, until all the chunks have been received.