File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Client socket closing. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Client socket closing." Watch "Client socket closing." New topic

Client socket closing.

Mohan raj gaddam

Joined: Feb 22, 2003
Posts: 4

When the server disconnects the client, then i have to close the client socket, its giving socketexception but the socket is not closing.How can i do that.. in the socketexception i gave system.out.println.. its keep on displaying. How do i close it once the server disconnects the client.
Client has a thread in which i am reading the data from the server, in the run method i am catching the socketException but not able to close the socket.

Mohan raj
It is sorta covered in the JavaRanch Style Guide.
subject: Client socket closing.
It's not a secret anymore!