|
-
Nov 23rd, 2007, 11:16 AM
#1
Thread Starter
Hyperactive Member
[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.
-
Nov 23rd, 2007, 01:17 PM
#2
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?
I don't live here any more.
-
Nov 23rd, 2007, 03:09 PM
#3
Thread Starter
Hyperactive Member
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...
-
Nov 24th, 2007, 06:50 AM
#4
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());
}
-
Dec 6th, 2007, 12:55 AM
#5
Thread Starter
Hyperactive Member
Re: App that will send local ip address to a remote app - How?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|