I have an application where I open a socket;
server = new ServerSocket(25000, 1, InetAddress.getByName("localhost"));
And a client that connects to him;
private Socket socket;
this.socket = new Socket("localhost", 25000);
The program works perfectly in local, my question is, how could I do to communicate the program in different computers? I have to pass the client the IP address of the server if or if, or there is some way that I can do it automatically ?
The objective would be not to make the user enter the IP address of the server, since it is not practical or easy for the User.