I have a server socket listening on port 5077 and waiting for client connections
boolean listening = true;
while (listening)
new ServerThread(server.accept()).start();
where ServerThread is a class extending Thread which processes the client connection.
On the client side, I have the following:
System.out.println("Establishing connection");
socket = new Socket(serverAddress, 5077);
System.out.println("Get stream...");
out = socket.getOutputStream();
// the rest of the code here...
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.
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.
Thank you.