static void TcpScan(List <int> ports, String host) { foreach (int port in ports) { Console.Write("\rsending port {0}", port); // send one request every 50 milliseconds // hack here using threads to create a false timeout TcpClient connection = new TcpClientWithTimeout(host, port, 50).Connect(); } Console.WriteLine(); }
static void TcpScan(List<int> ports, String host) { foreach (int port in ports) { Console.Write("\rsending port {0}", port); // send one request every 50 milliseconds // hack here using threads to create a false timeout TcpClient connection = new TcpClientWithTimeout(host, port, 50).Connect(); } Console.WriteLine(); }