本文介绍了使用TCP / IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何查找自己的IP号码(当然使用Pythoi)。我如何向/从另外的TCP / IP套接字(已知的ip号码)发送/接收数据?


我的意思是:我做哪个模块必须使用吗?


TIA,


JB

---- ==通过新闻发布.Com - Unlimited-Uncensored-Secure Usenet News == ----
世界排名第一的新闻组服务! > 100,000新闻组

--- = 19东/西海岸专业服务器 - 通过加密的总隐私= ---

How do I find out my own IP number (using Pythoi of course). And how do I
send/receive data to/from andother TCP/IP socket (of known ip number)?

I mean: which module do I have to use for that?

TIA,

JB
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

推荐答案




套接字模块。检查socket.socket类。

-

TZOTZIOY,我说英格兰最好,

Microsoft安全警报:Matrix开始是开放的来源。



The socket module. Check the socket.socket class.
--
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.





Thx。但这似乎不正常。当我启动程序

并打印结果时,我得到一个IP地址,但它不是正确的那个

即不是我目前使用的那个。 />

JB

---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全使用网新闻== ----
世界排名第一的新闻组服务! > 100,000新闻组

--- = 19东/西海岸专业服务器 - 通过加密的总隐私= ---



Thx. But this does not seem to work correctly. When I start the program
and print the result, I get an IP-address but it is not the correct one
i.e. not the one I am currently using.

JB
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---





计算机可以有多个IP地址。你怎么想

来处理有多个接口的情况

有不同的地址?


或者这只是个人代码?在这种情况下,请指定您计划运行它的

操作系统。


-Peter



A computer can have more than one IP address. How do you want
to deal with the situation where there are multiple interfaces
with different addresses?

Or is this just for personal code? In which case, please specify the
OS on which you plan to run it.

-Peter


这篇关于使用TCP / IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 16:49