Ich habe da mal eine frage und zwar
Ich möchte gerne eine Proxy checker schreibne und wollte es nicht über Httpwebrequest oder webproxy machen sondern per Ping
Jedoch kann ich nicht mit einem Port arbeiten
Code:
public string proxyip(int index)
{
return Proxyview.Items[index].SubItems[0].Text.ToString() + ":" + Proxyview.Items[index].SubItems[1].Text.ToString();//
}
public void Proxychecken(object Index)
{
while (isruning)
{
proyzahl++;
if (proyzahl == Proxyview.Items.Count)
{
isruning = false;
proyzahl = 1;
MessageBox.Show("Fetig");
}
string aIP = "";
if (Proxyview.InvokeRequired)
{
try
{
aIP = Proxyview.Invoke(new Proxydatenbekommen(proxyip), proyzahl).ToString();
Ping pingSender = new Ping();
PingOptions options = new PingOptions();
options.DontFragment = true;
string data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
byte[] buffer = Encoding.ASCII.GetBytes(data);
int timeout = 120;
PingReply reply = pingSender.Send(aIP, timeout, buffer, options);
if (reply.Status == IPStatus.Success)
{
MessageBox.Show("Complete");
}
}
catch
{
}
}
else
{
isruning = false;
}
}
}
wie kann ich den Port hinzufügen?
Wäre sehr dankbar für hilfe







