I would check if a server socket placed in the server is open. In the client when I create the socket Socket sock = new Socket(host,port) I check if it’s open doing:
if(sock == null)
System.out.println("The server is not connected!");
else
//Doing some task
but i don’t receive any result. there is method to check if the server socket at on the other side is open? I tried even the method isConnected() but nothing
If the server is not listening you will get an Connection Refused in an exception. You will never get a null from a
new