This program reads a list of hostnames from the command-line, attempts to open a socket to each host, and then prints to the remote host, the remote port, and the local address, and the local port. ** Happy Coding** Java Code: /* SocketInfo.java * Get the info of a socket */ import java.net.*; import java.io.*; public class SocketInfo{ public static void main(String[] args){ for(int index=0; index<args.length; index++){ ...
/* SocketInfo.java * Get the info of a socket */ import java.net.*; import java.io.*; public class SocketInfo{ public static void main(String[] args){ for(int index=0; index<args.length; index++){