import java.net *;. import java.io. *; public class Scanner implements Runnable {private InetAddress IPAddress; private int Port; private Thread allportThread; public Scanner (String IPAddress, int port) {try {this.IPAddress = this. Ipaddress.getByname (ipaddress); this.port = port;} catch (exception e) {system.out.println ("The host does not exist.");}}}} Public void Run ()}} public void Run ()}} public void run ()}} Socket (this.ipaddress, this.port); // if this port cannot been connection, throw a exception. System.out.println (this.port ": exist"); // if connection, print out.} Catch (Exception e) {}} public static void main (string "argg) {string str; str =" TPOI Scanner 1.0 - Network host scanner / n "; str =" Author: tt (tpoi: http: // www .tpoi.net) / N / N "; Str =" USAGE: Scanner
else {mainScanner.allportThread = new Thread (mainScanner); mainScanner.allportThread.start ();}} break;} case 'P': {Scanner mainScanner = new Scanner (args [2], java.lang.Integer.parseInt ( Args [1], 10)); try {mainscanner.run ();} catch (exception e) {system.out.println ("parameter error");} Break;} default: system.out.println (STR) }}}} The younger brother is a student who just started to read DEGREE.
I really want to make friends with a high man MSN: zhuo_chang@hotmail.comqqqq: 367271