github_url: | hide |
---|
Inherits: :ref:`Object<class_Object>`
Inherited By: :ref:`IP_Unix<class_IP_Unix>`
Internet protocol (IP) support functions such as DNS resolution.
IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see :ref:`StreamPeerTCP<class_StreamPeerTCP>` and :ref:`TCP_Server<class_TCP_Server>`). IP provides DNS hostname resolution support, both blocking and threaded.
enum ResolverStatus:
enum Type:
Removes all of a hostname
's cached references. If no hostname
is given, all cached IP addresses are removed.
Removes a given item id
from the queue. This should be used to free a queue after it has completed to enable more queries to happen.
Returns all of the user's current IPv4 and IPv6 addresses as an array.
Returns all network adapters as an array.
Each adapter is a dictionary of the form:
{ "index": "1", # Interface index. "name": "eth0", # Interface name. "friendly": "Ethernet One", # A friendly name (might be empty). "addresses": ["192.168.1.101"], # An array of IP addresses associated to this interface. }
Returns a queued hostname's IP address, given its queue id
. Returns an empty string on error or if resolution hasn't happened yet (see :ref:`get_resolve_item_status<class_IP_method_get_resolve_item_status>`).
Returns a queued hostname's status as a :ref:`ResolverStatus<enum_IP_ResolverStatus>` constant, given its queue id
.
Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the :ref:`Type<enum_IP_Type>` constant given as ip_type
.
Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the :ref:`Type<enum_IP_Type>` constant given as ip_type
. Returns the queue ID if successful, or :ref:`RESOLVER_INVALID_ID<class_IP_constant_RESOLVER_INVALID_ID>` on error.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。