private string UDPScan(int port, IPEndPoint ipEnd) { try { var udpcl = new UdpConnectCall(Convert.ToInt32(textBox6.Text)); udpcl.Connect(ipEnd); return(string.Format("{0} is opened\n", port)); } catch (Exception ex) { switch (ex.Message) { case "CLOSED": return(string.Format("{0} is closed\n", port)); break; case "TIME_OUT": return(string.Format("{0} is open/filtered\n", port)); break; default: break; } } return(null); }
private string UDPScan(int port, IPEndPoint ipEnd) { try { var udpcl = new UdpConnectCall(Convert.ToInt32(textBox6.Text)); udpcl.Connect(ipEnd); return (string.Format("{0} is opened\n", port)); } catch (Exception ex) { switch (ex.Message) { case "CLOSED": return (string.Format("{0} is closed\n", port)); break; case "TIME_OUT": return (string.Format("{0} is open/filtered\n", port)); break; default: break; } } return null; }