FileFind.Meshwork.GtkClient.Windows.PreferencesDialog.TestTCPPort C# (CSharp) Method

TestTCPPort() private method

private TestTCPPort ( ) : bool
return bool
        private bool TestTCPPort()
        {
            try {
                WebResponse resp = HttpWebRequest.Create("http://filefind.net/test_port.php?port=" + nodePortSpinButton.Value.ToString()).GetResponse();
                using (resp) {
                    using (StreamReader reader = new StreamReader(resp.GetResponseStream())) {
                        string response = reader.ReadToEnd();
                        if (response == "1")
                            return true;
                    }
                }
            } catch (Exception) { /* ignore */ }
            return false;
        }