Connecting to HTTP Server with sockets!!

Hi,

I am connecting to a http server with sockets This works fine. I was thinking that instead creating a new socket for each and every request can i create a single socket itself and use the flush method to commit to the stream and get its response. This would mean that the client connection is established with the httpserver till a disconnect is called. Would this slow down the performance on the Server side ?

Do let me know.

Thanks in advance!

[476 byte] By [keyboardsamuraia] at [2007-11-26 18:34:04]
# 1

Do you control both ends- then certainly.

The protocol allows for that.

If you only control the clients then it only matters if the server supports it or not. If you are connecting to many different servers then you might have problems if some don't allow it.

You would also have to deal with timeouts from the server if the traffic is not sufficient.

Note that this applies to http in general and not necessarily to whatever code you are using.

jschella at 2007-7-9 6:08:11 > top of Java-index,Core,Core APIs...