aspose file tools*
The moose likes Java in General and the fly likes java.net.SocketException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "java.net.SocketException" Watch "java.net.SocketException" New topic
Author

java.net.SocketException

Ketan KC Chachad
Ranch Hand

Joined: Nov 23, 2003
Posts: 76
Hi,
I hope I am asking my doubt in the correct forum if not please guide me to the correct one. I just want to know the possible conditions under which an exception like
java.net.SocketException: Connection resent by peer: socket write error
is thrown?
Thanks in advance.


Regards,<br />Ketan KC Chachad
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Are you sure, that it is 'socket resent by peer'?
Isn't it 'socket reset by peer'?


http://home.arcor.de/hirnstrom/bewerbung
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

If a process tries to write to a socket, and is surprised to find the other end of the connection is closed, that's the exception you'll get. So,for instance, if a client is connected to a server, and the server crashes or is killed, then if the client tries to send a message via that connection, you'll see the "connection reset by peer" exception.


[Jess in Action][AskingGoodQuestions]
Ketan KC Chachad
Ranch Hand

Joined: Nov 23, 2003
Posts: 76
Sorry for the typo mistake, the error is Can the server close the socket connection on its own without shutting down or getting killed? I mean to say that can this error be given to a client by a server even when the server is running?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java.net.SocketException