dcsimg
Socket, multi-thread, exception!_NEWLINE_!HELP,THANK YOU!
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   lipeng_wu
Posted On:   Tuesday, April 3, 2001 02:38 AM

I am now transferring data between Server-multiClient using Socket and multiple threads. Sometimes it prompts that "Connection reset by peer; JVM_recv in Socket input stream read" or SocketException, connection reset. I wonder to know why threw out such error code. how to avoid such kind of error. sometimes my Java server end also happened such error as connection reset by peer. this cause my server program be terminated and all the client stay "connection refused,....." now I run a distributed program on 50 computers, and many problem happened. ;) Thank you for you attention and kindly help. Best Regards!    More>>

I am now transferring data between Server-multiClient using Socket and multiple threads.
Sometimes it prompts that "Connection reset by peer; JVM_recv in Socket input stream read"
or SocketException, connection reset.
I wonder to know why threw out such error code. how to avoid such kind of error.
sometimes my Java server end also happened such error as connection reset by peer.
this cause my server program be terminated and all the client stay "connection refused,....."
now I run a distributed program on 50 computers, and many problem happened. ;)
Thank you for you attention and kindly help.
Best Regards!

   <<Less

Re: Socket, multi-thread, exception!_NEWLINE_!HELP,THANK YOU!

Posted By:   Tim_Rohaly  
Posted On:   Saturday, April 21, 2001 10:06 AM

"Connection reset by peer" means that the remote process
terminated, usually abnormally. To insulate yourself against
these errors, your server needs to catch the exception and properly
clean up (close the socket, end the thread, etc.). If you handle
the exceptions properly, then your server should be able to continue
running indefinitely.


"Connection refused" means that there is no program listening
on the host/port you are trying to connect to, which makes sense
because you said your server terminated.

About | Sitemap | Contact