Пример #1
0
 private bool canConnectTo(Instance info)
 {
     var client = new SocketClient();
     client.Connect(info.Port, (s) => {});
     var connected = client.IsConnected;
     client.Disconnect();
     if (!connected)
         File.Delete(info.File);
     return connected;
 }
 private bool canConnectTo(Instance info)
 {
     var client = new SocketClient();
     client.Connect(info.Port, (s) => {});
     var connected = client.IsConnected;
     client.Disconnect();
     if (!connected) {
         try {
             Process.GetProcessById(info.ProcessID);
         } catch {
             File.Delete(info.File);
         }
     }
     return connected;
 }