public void Connect(string path) { _path = path; if (_client != null && _client.IsConnected) { _client.Disconnect(); } _client = null; isConnected(); }
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); }
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; }