bool ScanPort(IPEndPoint ipEo, ProtocolType protocol = ProtocolType.Tcp, int timeOut = 5000)
{
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, protocol);
IAsyncResult result = socket.BeginConnect(ipEo, null, null);
return result.AsyncWaitHandle.WaitOne(timeOut, true);
}