Client Socket Fails to Connect to ServerSocket
I have a server socket listening on port 5077 and waiting for client connections
where ServerThread is a class extending Thread which processes the client connection.
boolean listening = true;
On the client side, I have the following:
When running the client, it only prints "Establishing connection" and stops there (it never connects) and throws no exceptions whatsoever. But when I try to use telnet on the client PC to the server address on port 5077 it works correctly which is completely strange. The client already works on other PCs, but on others it just freezes while telnet works.
socket = new Socket(serverAddress, 5077);
out = socket.getOutputStream();
// the rest of the code here...
I've been trying to solve this for a while now but nothing worked, would be very kind if someone could point out what to do.