Skip to content
Advertisement

Tag: networking

If a peer client disconnects from a server could we just ignore the socketexception at the server side?

I have a server which accepts input from client; it reads text input from client and processes it in some way(each new connection is assigned a thread also). However, whenever a client suddenly disconnects from the server I receive a socketException(connection reset) from the server where BufferedReader.readLine() is invoked. So basically this exception is an indicator that a client was

java.net.ConnectException: Connection refused

I’m trying to implement a TCP connection, everything works fine from the server’s side but when I run the client program (from client computer) I get the following error: I tried changing the socket number in case it was in use but to no avail, does anyone know what is causing this error & how to fix it. The Server

Advertisement