how does Xojo.Net.HTTPSocket manage keep-alive connections?

And how can I know if a connection is in progress or if it’s ready for another request?

I assume (heh) that if the server supports keep-alive then after the response as been sent back to me that the socket will stay open until I close it or some other timeout is reached. If I make additional Send calls after the connection is established and the first request is finished do they go down the same pipe that it kept open? I should call ClearRequestHeaders first though correct?

So how can I tell if the connection is ready for another request or not? Or does HTTP/1.1 support my sending as many requests as I like and it will just queue them up itself and I don’t have to worry about waiting for one to finish before I start another? There is some vague references in the docs about a request already in progress type exception, but I don’t see that documented in the send method for the xojo.net.httpsocket?

There is a change that the server won’t support http/1.1 and I’ll have to drop back to 1.0 or that connection-close will be specified in the first return. So what happens in the case of my having queued up several requests at once and then the socket is actually closed. I assume it won’t save those up and fire them out one at a time then?

If there was a property to let me know that there is a request in progress that would make it fairly easy to queue up additional requests and push them out after the last one was received, after some non-fatal error was received or timeout. But I don’t see that in the documentation either. Do I have to subclass the socket and add that by setting it to true when I do a send and then resetting it when the response is received?