0
Reply

C# IPHostEntry Cache???

kevin 0

kevin 0

Aug 20 2004 11:41 PM
2k
Here is one of the coolest few lines of code to perform a NSLookUp. Simply enter an IP in textBox1, click a button and the domain name translates in textBox2 (providing your workstation is on a WAN. Q. How could we build a 'cache' to capture redundant IP's/Domain's to add lookup performance??? Q. How could we add our own know IP's/Domain's to this 'cache' ??? (Because NOT every IP will resolve) Preferably the code would check our personal 'cache' first before looking on the Internet or elsewhere..... public void ButtonLookupDomain_Click(object sender, EventArgs ea) { IPHostEntry IP = Dns.Resolve(textBox1.Text); txtBox2.Text = IP.HostName; }