Originally posted by Robert Kennedy:
I am using http. In this case it makes sense to create a new socket for each file.
More than it makes sense, the HTTP specs require it. You make a GET, and the server returns one response. It can't return two. Similarly, when you make a PUT, you do one PUT.
There are many times when HTTP is not the answer, but in today's world of firewalls, NAT, etc. its often the only choice.
I've seen folks try to write the equivalent of TCP/IP on top of HTTP. Which is really silly, as under HTTP is of course, TCP/IP