problem in socket connection in sending images

hi all,

i am tying to capturing images and sending it to the server from client program , first i converted a captured image into byte array and then sending it throw outputstream of socket but after sending one image a error encontered that is - connection reset by peer: socket Write error

I doubt your problem has to do with the data itself. You say that one image gets through, then the client socket get a closed error. Most likely, the server closed the connection after receiving the image.

Either start a new connection for each image at the client, or modify the server and the client to allow additional communication indicating that another image will be sent, or that the client is done sending images.

I would think that the server would allow the client to close the connection as well, although that is not a rule.