简体   繁体   English

如何使用python连接两台计算机

[英]How to connect two computers using python

我想连接两台计算机并在它们之间发送消息,我不确定为什么套接字模块对我不起作用。那么还有其他方法可以连接两台计算机吗?

If you wanna solve this problem, 如果您想解决这个问题,

First thing , you should check two computer's network connecting, in terminal you can use one computer of yours to typing ping ${target_computer_address} and check terminal's echo to make sure two computer network connection is working. 首先,您应该检查两台计算机的网络连接,在终端中您可以使用您的一台计算机键入ping ${target_computer_address}并检查终端的回显以确保两台计算机的网络连接正常。

Second thing , you can use python to open a tcp port to listen and print recv data in screen ,and in other computer telnet previous computer ip:port just typing someting, make sure python can print you's typing character correct. 第二件事,您可以使用python打开一个tcp端口来侦听和打印屏幕上的recv数据,而在其他计算机telnet之前的计算机ip:port中,只需键入someting,确保python可以打印您所键入的字符正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM