网络计算机的IP地址
我正在编写的程序通过网络 API 连接到另一个程序,我相信这称为套接字连接。我指定 IP:127.0.0.1 和端口,该端口必须与我在该程序中设置的内容相匹配。现在,这工作正常。但是,如果我想让该程序在网络上的另一台计算机上运行怎么办?
我已经建立了无线家庭网络,两台计算机之间可以进行文件共享。我以为我可以运行 cmd>ipconfig 来获取另一台计算机的 IP,但由于某种原因 ipconfig 不会在它上运行。只是给出一个错误。我现在如何确定用于此类网络连接的正确 IP?
PS:我运行的是 XP Pro。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用计算机名称而不是 IP(但是,这取决于您正在处理的内容)。要查看计算机名称,请右键单击我的电脑/属性。
或者,您只需对它进行 ping 操作即可查看它的 IP:
在响应中,您将获得解析的 IP 地址,即您运行它的计算机看到它的方式。
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:
In the response you'll get the resolved IP address, the way computer you ran it on sees it.
打开网络连接(开始 -> 设置 -> 控制面板 -> 网络连接)并找到您的无线连接。左键单击并选择属性。然后按照“高级”选项卡,您可能会找到您的 IP。
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
显示您计算机的地址。您可以在另一台计算机上使用ipconfig
来检查其IP地址。然后使用该地址代替127.0.0.1
。有ipconfig /all
显示更多信息,如果您有更多网卡,想要检查 MAC 地址等,则可以使用,但这是有关此命令所工作的计算机的信息。ipconfig
shows you the address of your computer. You can useipconfig
on the other computer to check its IP address. Then instead of127.0.0.1
use that address. There isipconfig /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.