how do i connect to the server socket using the ip address and port number( client is running on a different machine than server)
Client program public class client implements Runnable { protected static String server_IP = "141.117.57.42"; private static final int server_Port = 5555 ; protected static String client_IP ; public static void main(String[] args) throws IOException{ final String host = "localhost"; int init = 0 ; try { InetAddress iAddress = InetAddress.getLocalHost(); client_IP = iAddress.getHostAddress(); System.out.println("Current IP address : " +client_IP); } catch (UnknownHostException e) { } try {System.out.println("hello1"); Socket socket = new Socket(server_IP,server_Port); System.out.println("hello3