[英]How do I connect two computers using the same router?
I'm using the python socket module on a Mac.我在 Mac 上使用 python 插座模块。
How do I connect two computers using the same router?如何使用同一路由器连接两台计算机? I need a TCP socket with fast data passing between.我需要一个 TCP 套接字,可以快速传递数据。
When I tried just hooking two computers up by their private ip address, then I got a Connection Refused error.当我尝试通过它们的私有地址 ip 连接两台计算机时,我收到了连接被拒绝的错误。 How do I do this?我该怎么做呢?
You can check first whether connection is allowed between two devices by going to one device and running te.net.您可以首先检查两个设备之间是否允许连接,方法是转到一个设备并运行 te.net。
telnet <Private-IP-of-Second-Device> <Port>
If this shows connected then connectivity is good and issue exists with the socket module you have written.如果这显示已连接,则连接良好并且您编写的套接字模块存在问题。 If this fails you can try checking the firewall by going to System Preferences > Security & Privacy > Firewall.
如果失败,您可以尝试通过转到“ System Preferences > Security & Privacy > Firewall.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.