views:

56

answers:

3

Hi,

The program I'm coding connects to another program via a network-API, and I believe it's called a socket connection. I specify the IP: 127.0.0.1, and the Port, which must match what I set in that program. Now, this works fine. But what if I want to have the program running on another computer on a network?

I have set up a wireless home network, and file sharing works between the two computers. I thought I could just run cmd>ipconfig to get the IP of the other computer, but for some reason the ipconfig will not run on it. Just gives an error. How do I now determine the correct IP to use for this type of network connection?

PS: I'm running XP Pro.

A: 

Open network connections (Start -> Settings -> Control Panel -> Network Connections) and find there your wireless connection. Left click and select Properties. Then follow the Advanced tab and there you propapbly will find your IP.

heximal
This also may be done with "ipconfig /a" command. BTW, as far as I understand the question, program way to obtain IP address is required.
Kel
well, it doesn't seem to show. I can click on TCP/IP in the general tab, but it only shows that IP is set to automatic, and not showing the actual IPs.
bretddog
thing is: when i try to run cmd > ipconfig (from run) .. It doesnt run like normal. it says: "An internal error occured" A unit connected to the system does not work.. (Or something similar; it is not English XP) So I can't get it from there.
bretddog
A: 

ipconfig shows you the address of your computer. You can use ipconfig on the other computer to check its IP address. Then instead of 127.0.0.1 use that address. There is ipconfig /all that show much more information, usable if you have more network cards, want to check MAC address etc, but this is information about computer this command work on.

Michał Niklas
ipconfig doesn't work. that's the problem :)
bretddog
Then get it to work, there should be a root cause for the issue. Simplest way is usually to backup data, wipe and reload the Windows installation, it's likely faulty and/or has driver conflicts and that could take an infinite time to resolve if you're not familiar with the system.
Oskar Duveborn
Thanks, but I think simplest way is just to ignore it. I have better things to spend my time on. :)
bretddog
+1  A: 

You could use the computer name instead of the IP (but, this depends what you're working on). To see what the computer name is right click My Computer / Properties.

Or, you can see it's IP simply by pinging it:

ping MyPCName

In the response you'll get the resolved IP address, the way computer you ran it on sees it.

veljkoz
Brilliant! I didn't think of that.. Thanks! :)
bretddog