开发者

IP address of network computer

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 r开发者_C百科eason 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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜