I have created a server socket with port 4242 but, It is getting timed out. serversock.accept() takes very long time to execute. Please advice.
ServerSocket serversock= new ServerSocket(4242);
System.out.println("Waiting " + serversock.getLocalPort() + "...");
Socket socket = serversock.accept();
System.out.println("Just connected to " + serversock.getLocalSocketAddress());