python - How to setup a client server without localhost using python
问题描述
I am very novice with socket programming so sorry about any simple questions
My objective is to create a server which sends to several clients a csv file, clients located in different locations
I have a question about the following initial part of server and client
#TCP_IP = 'localhost'
TCP_IP = socket.gethostbyaddr("myip?")[0]
TCP_PORT = 9001
When debugging that line I get a valid isp domain but If I do it this way I get an error that the Address is not valid
Shouldnt I place my real static ip in server script and in client script?
解决方案
推荐阅读
- javascript - 有什么方法可以在画布 javascript 中触发点击事件?
- java - 如何使屏幕出现鼠标按下停留在屏幕上?
- angular - 如何在不同模块的一个 Angular 项目中使用两个版本的 Bootstrap
- loops - 循环输入组件 x86
- javascript - 根据地理定位限制我的代码在网页上加载的次数 - javascript
- android - 9-Patch drawable 在 Android Studio 布局编辑器中显示不正确
- python - 基于度数更改节点大小的AttributeError
- python - 读取、导入和处理保存为 .dat 的图像
- azure - 是否可以强制 Azure IoT 中心将 blob 保存为内容类型 application/json
- c++ - QGraphicsView 在调整大小大于起始宽度时剪辑图像