Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActionListener for ServerSocket who ?

Status
Not open for further replies.

haux

Programmer
Apr 11, 2001
79
DZ
i have programed with Delphi since last year, and now i am exploring the famous world of JAVA.

Delphi has ServerSocketOnClientDisconnect as Event, it's called imediately when the connection with client is interrupted.

I want to know if Java have something similer that can simplify to my programing?. I havn't found equivalent method in the JDK1.3 API doc

thanks for all ;)
 
Hi,

If you have tried it out, you will realise that a SocketException would be thrown at the server-side when the client disconnects himself. However, if the server disconnects himself, the client will only receive a SocketException when the client tries to communicate with the server again. An example of the SocketException thrown is:-

java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read

Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top