HTTP POST over sockets
Is there any way of sending multiple HTTP POSTs over a single socket and connection?
Right now I'm having to create a new connection and then write the POST bytes to the socket's output stream. If I try to loop this method, it only does it once and then for some reason doesn't send anything after that. I can only fix this by creating a new socket for each iteration of the loop, but I'd like a way around that.
Does the server you are communicating with support it?
What does CONNECTION: keep-alive do for this?
Why do you not use a URLConnection? The working with a socket seems complicated for a HTTP connection.