adding ipv6
This commit is contained in:
parent
048bffd13a
commit
887a897c02
17 changed files with 445 additions and 127 deletions
14
core/io/ip.h
14
core/io/ip.h
|
|
@ -48,6 +48,14 @@ public:
|
|||
RESOLVER_STATUS_ERROR,
|
||||
};
|
||||
|
||||
enum AddressType {
|
||||
|
||||
ADDRESS_IPV4 = 1,
|
||||
ADDRESS_IPV6 = 2,
|
||||
|
||||
ADDRESS_ANY = 3,
|
||||
};
|
||||
|
||||
enum {
|
||||
RESOLVER_MAX_QUERIES = 32,
|
||||
RESOLVER_INVALID_ID=-1
|
||||
|
|
@ -65,7 +73,7 @@ protected:
|
|||
static IP*singleton;
|
||||
static void _bind_methods();
|
||||
|
||||
virtual IP_Address _resolve_hostname(const String& p_hostname)=0;
|
||||
virtual IP_Address _resolve_hostname(const String& p_hostname, IP_Address::AddrType p_type = IP_Address::TYPE_ANY)=0;
|
||||
Array _get_local_addresses() const;
|
||||
|
||||
static IP* (*_create)();
|
||||
|
|
@ -73,9 +81,9 @@ public:
|
|||
|
||||
|
||||
|
||||
IP_Address resolve_hostname(const String& p_hostname);
|
||||
IP_Address resolve_hostname(const String& p_hostname, IP_Address::AddrType p_type = IP_Address::TYPE_ANY);
|
||||
// async resolver hostname
|
||||
ResolverID resolve_hostname_queue_item(const String& p_hostname);
|
||||
ResolverID resolve_hostname_queue_item(const String& p_hostname, IP_Address::AddrType p_type = IP_Address::TYPE_ANY);
|
||||
ResolverStatus get_resolve_item_status(ResolverID p_id) const;
|
||||
IP_Address get_resolve_item_address(ResolverID p_id) const;
|
||||
virtual void get_local_addresses(List<IP_Address> *r_addresses) const=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue