private string UdpScan(IPEndPoint ipEndPoint) { ScanMessage message = UdpConnectCall.Connect(ipEndPoint, timeout); switch (message) { case ScanMessage.PortClosed: return(String.Format("{0} is closed.\r\n", ipEndPoint.Port)); case ScanMessage.PortOpened: return(String.Format("{0} is opened.\r\n", ipEndPoint.Port)); case ScanMessage.Timeout: return(String.Format("{0} is open/filtered.\r\n", ipEndPoint.Port)); case ScanMessage.Unknown: default: return(String.Format("{0} is in unknown state.\r\n", ipEndPoint.Port)); } }
private string SynScan(IPEndPoint ipEndPoint) { var synConnectCall = new SynConnectCall(timeout, device, gateway); ScanMessage message = synConnectCall.Connect(ipEndPoint); switch (message) { case ScanMessage.PortClosed: return(String.Format("{0} is closed.\r\n", ipEndPoint.Port)); case ScanMessage.PortOpened: return(String.Format("{0} is opened.\r\n", ipEndPoint.Port)); case ScanMessage.Timeout: return(String.Format("{0} is filtered.\r\n", ipEndPoint.Port)); case ScanMessage.Unknown: default: return(String.Format("{0} is in unknown state.\r\n", ipEndPoint.Port)); } }
private void OnScan(ScanMessage message) { Code.Value = message.Code; }