[RESOLVED] App that will send local ip address to a remote app - How?
I am hoping someone can point out what to begin with to try to have an application grab the local computer's ip address and then send it to a computer at a known ip address.
Any ideas or suggestions would be appreciated.
If there's already a free tool that does this, that would be fine too.
Thanks in advance.
Re: App that will send local ip address to a remote app - How?
Just open a TCP socket connection between the machines. The IP will automatically be visible. Unless you mean the local machine's IP on the local subnet?
Re: App that will send local ip address to a remote app - How?
I want to be able to use remote desktop to connect to him. But I want to be able to do it without him having to always tell me what his new ip address is when it changes since it's dynamic ip. So I want this app to be on his computer, grab his ip and then send it to me...
Re: App that will send local ip address to a remote app - How?
If it's on a local network, then you can retrieve his IP address by:
Code:
string localhostName = System.Net.Dns.GetHostName();
System.Net.IPHostEntry ipHostEntry = System.Net.Dns.GetHostEntry(localhostName);
System.Net.IPAddress[] hostAddresses = ipHostEntry.AddressList;
Console.WriteLine("Host: {0}", localhostName);
foreach (System.Net.IPAddress hostAddress in hostAddresses)
{
Console.WriteLine("\t{0}", hostAddress.ToString());
}
Re: App that will send local ip address to a remote app - How?