// This appears in Core Web Programming from Prentice // Hall Publishers, and may be freely used or adapted. // 1997 Marty Hall, http://www.apl.jhu.edu/~hall/java/ /** Make simple connection to host and port specified. */ public class NetworkClientTest { public static void main(String[] args) { String host = "localhost"; if (args.length > 0) host = args[0]; int port = 5555; if (args.length > 1) port = Integer.parseInt(args[1]); NetworkClient nwClient = new NetworkClient(host, port); nwClient.connect(); } }