i have another network problem!
when i close the socket in server side or the client side i get connection reset exception and then i'm not able to reconnect without resetting the server then start the client again, so how can i close a socket and reconnect without resetting the server??

thanks in advance


this thread is 7 days old and maybe by now your problem is solved, but in case not,

I'm guessing by the nature of your problem, that you are using some kind of OutputStream in the client side.

Everytime you close the stream, you are automatically closing the socket connection so you dont have to close the connection, simply close the stream. notice that the flush() method of any outputstream has no effect when running a socket connection, but if you close it, and create a new connection everytime, your server should run just fine.