Results 1 to 5 of 5

Thread: [RESOLVED] App that will send local ip address to a remote app - How?

  1. #1

    Thread Starter
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Resolved [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.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    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.

  3. #3

    Thread Starter
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    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...

  4. #4
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    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());
    }

  5. #5

    Thread Starter
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Re: App that will send local ip address to a remote app - How?

    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width