【问题标题】:faster or batch alternative to python's socket.gethostbyaddr()?python 的 socket.gethostbyaddr() 的更快或批量替代方案?
【发布时间】:2013-07-28 17:09:47
【问题描述】:

在给定 IP 地址的情况下,是否有更快或批量替代 socket.gethostbyaddr() 的方法来确定主机?谢谢。

【问题讨论】:

    标签: python networking python-sockets gethostbyaddr


    【解决方案1】:

    可以使用dnspython模块[1],查看from_address函数。

    注意:它是线程安全的。

    [1]http://www.dnspython.org/

    【讨论】:

      猜你喜欢
      • 2012-10-06
      • 2014-10-22
      • 2013-04-16
      • 2018-12-11
      • 2012-07-05
      • 2012-01-23
      • 2013-07-13
      • 2011-02-27
      相关资源
      最近更新 更多