简体   繁体   English

python服务器和java客户端(另一台PC)错误

[英]python server and java client(another PC) Error

I made server using python on laptop. 我在笔记本电脑上使用python制作了服务器。 And I made client using Java on samelaptop. 我让客户端在samelaptop上使用Java。 They were connected, and They were communicated. 他们联系在一起,并进行了沟通。 But when I made client using Java on another laptop, client didn't find server What is wrong?? 但是,当我让客户端在另一台笔记本电脑上使用Java时,客户端找不到服务器。这是怎么回事? and What could I do?? 而我该怎么办?

On the laptop running the server: 在运行服务器的笔记本电脑上:
The client can access using localhost:<port> or 0.0.0.0:<port> 客户端可以使用localhost:<port>0.0.0.0:<port>

Connecting from another laptop (same network): 从另一台笔记本电脑(同一网络)进行连接:
You have to connect to: <pc-server-local-ip>:<port> 您必须连接到: <pc-server-local-ip>:<port>

To get <pc-server-local-ip , using the laptop running your server: 要使用运行服务器的便携式计算机获取<pc-server-local-ip ,请执行以下操作:
- Windows : type ipconfig in console, value next to IPV4 -Windows:在控制台中键入ipconfigIPV4旁边的值
- Linux / Mac : type ifconfig in console, value next to inet -Linux / Mac:在控制台中输入ifconfig ,值位于inet旁边

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

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