in reply to Preventing a socket from closing (was: Sockets...)

You didn't say which kind of server you are connecting to. If you are connecting to a HTTP server, it may be closing the connection at the end of each request (the correct behaviour).

____________________
Jeremy
I didn't believe in evil until I dated it.