IPSingleton

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 StreamPeerTCP and TCP_Server). IP provides DNS hostname resolution support, both blocking and threaded.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
ResolverStatus
enum ResolverStatus
Type
enum Type

Functions

clearCache
void clearCache(String hostname)

Removes all of a hostname's cached references. If no hostname is given, all cached IP addresses are removed.

eraseResolveItem
void eraseResolveItem(long id)

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.

getLocalAddresses
Array getLocalAddresses()

Returns all the user's current IPv4 and IPv6 addresses as an array.

getLocalInterfaces
Array getLocalInterfaces()

Returns all network adapters as an array. Each adapter is a dictionary of the form:

getResolveItemAddress
String getResolveItemAddress(long id)

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 getResolveItemStatus).

getResolveItemStatus
IP.ResolverStatus getResolveItemStatus(long id)

Returns a queued hostname's status as a resolverstatus constant, given its queue id.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(IPSingleton other)
opEquals
bool opEquals(typeof(null) n)
resolveHostname
String resolveHostname(String host, long ip_type)

Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the type constant given as ip_type.

resolveHostnameQueueItem
long resolveHostnameQueueItem(String host, long ip_type)

Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the type constant given as ip_type. Returns the queue ID if successful, or constant RESOLVER_INVALID_ID on error.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
IPSingleton _new()

Construct a new instance of IPSingleton. Note: use memnew!IPSingleton instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta