posted 19 years ago
HTTP Connections are reusable. If the 'Connection:keep-alive' header is set,
server will not close the connection after returning the request (if compliant).
However, it doesn't look like in MIDP (nor, IMHO, J2SE), you can create a HTTP Connection object that can be reused. So it looks like you have to have your own HTTP connection object implemented to achieve what you need. If you don't expect fancy headrs, like continuation, and redirections, this may be somewhat easy to do, however, parsing the chunked data streams is somewhat cumbersome. The idea would be to have a connection pool (like MIDP does), but don't remove the connections when a response is completely read (like MIDP does too).
With best of best regards, Pawel S. Veselov ( aka Black Angel )