Efl.Net.Ip_Address (class)


An Internet Protocol (IP) Address.

This class is a set of helpers to translate to and from address strings used in Efl.Net. For IP they take the following formats:

- IPv4 complete: - IPv4 no port: - IPv6 complete: [::1]:1234 - IPv6 no port: [::1] - IPv6 no braces (implies no port): ::1

However in other libraries you can use the address numbers or even a 'struct sockaddr' handle. Translating by yourself may be too much work. To convert to a string just create an instance with Efl.Net.Ip_Address.create or Efl.Net.Ip_Address.create_sockaddr and then query Efl.Net.Ip_Address.string. To convert from numeric string to sockaddr, create an instance with Efl.Net.Ip_Address.parse and then query Efl.Net.Ip_Address.sockaddr.

To resolve a host and port name to numbers use Efl.Net.Ip_Address.resolve, this will asynchronously resolve and return the results in a promise.

The result of Efl.Net.Ip_Address.string can be passed to Efl.Net.Dialer.dial and Efl.Net.Server.serve

Since 1.19



address (get, set)

The bytes representing the address.
const Eina_Slice efl_net_ip_address_get(const Eo *obj);
void efl_net_ip_address_set(Eo *obj, const Eina_Slice address);


Checks if "" (IPv4) or "::" (IPv6)
Eina_Bool efl_net_ip_address_any_check(const Eo *obj);

create class

Creates an object given family, port and address.
Efl_Net_Ip_Address *efl_net_ip_address_create(Efl_Class *klass, uint16_t port, const Eina_Slice address);

create_sockaddr class

Creates an object given sockaddr
Efl_Net_Ip_Address *efl_net_ip_address_create_sockaddr(Efl_Class *klass, const void *sockaddr);

family (get, set)

The address family, one of AF_INET6 or AF_INET.
int efl_net_ip_address_family_get(const Eo *obj);
void efl_net_ip_address_family_set(Eo *obj, int family);

finalize [Overridden from Efl.Object]

Called at the end of efl_add. Should not be called, just overridden.
Efl_Object *efl_finalize(Eo *obj);


Checks if IPv4 and is CLASS-A
Eina_Bool efl_net_ip_address_ipv4_class_a_check(const Eo *obj);


Checks if IPv4 and is CLASS-B
Eina_Bool efl_net_ip_address_ipv4_class_b_check(const Eo *obj);


Checks if IPv4 and is CLASS-C
Eina_Bool efl_net_ip_address_ipv4_class_c_check(const Eo *obj);


Checks if IPv4 and is CLASS-D
Eina_Bool efl_net_ip_address_ipv4_class_d_check(const Eo *obj);


Checks if IPv6 is link-local.
Eina_Bool efl_net_ip_address_ipv6_local_link_check(const Eo *obj);


Checks if IPv6 is site-local.
Eina_Bool efl_net_ip_address_ipv6_local_site_check(const Eo *obj);


Checks if IPv6 is compatible with IPv4.
Eina_Bool efl_net_ip_address_ipv6_v4compat_check(const Eo *obj);


Checks if IPv6 is mapping an IPv4.
Eina_Bool efl_net_ip_address_ipv6_v4mapped_check(const Eo *obj);


Checks if loopback "" (IPv4) or "::1" (IPv6)
Eina_Bool efl_net_ip_address_loopback_check(const Eo *obj);


Checks if multicast
Eina_Bool efl_net_ip_address_multicast_check(const Eo *obj);

parse class

Parses a numeric address and return an object representing it.
Efl_Net_Ip_Address *efl_net_ip_address_parse(Efl_Class *klass, const char *numeric_address);

port (get, set)

The address port in Host/Native endianess.
uint16_t efl_net_ip_address_port_get(const Eo *obj);
void efl_net_ip_address_port_set(Eo *obj, uint16_t port);

resolve class

Asynchronously resolves host and port names.
Efl_Future *efl_net_ip_address_resolve(Efl_Class *klass, const char *address, int family, int flags);

sockaddr (get, set)

The <netinet/in.h>-compatible 'struct sockaddr'.
const void *efl_net_ip_address_sockaddr_get(const Eo *obj);
void efl_net_ip_address_sockaddr_set(Eo *obj, const void *sockaddr);

string (get)

Returns the numeric address formatted as a string.
const char *efl_net_ip_address_string_get(const Eo *obj);


allow_parent_unref (get, set) Allow an object to be deleted by unref even if it has a parent.
children_iterator_new Get an iterator on all childrens
comment (get, set) A human readable comment for the object
composite_attach Make an object a composite object of another.
composite_detach Detach a composite object from another object.
composite_part_is Check if an object is part of a composite object.
constructor Call the object's constructor.
debug_name_override Build a read-only name for this object used for debugging.
del Unrefs the object and reparents it to NULL.
destructor Call the object's destructor.
event_callback_forwarder_add Add an event callback forwarder for an event and an object.
event_callback_forwarder_del Remove an event callback forwarder for an event and an object.
event_callback_stop Stop the current callback call.
event_freeze Freeze events of object.
event_freeze_count (get) Return freeze events of object.
class event_global_freeze Freeze events of object.
class event_global_freeze_count (get) Return freeze events of object.
class event_global_thaw Thaw events of object.
event_thaw Thaw events of object.
finalized (get) True if the object is already finalized, otherwise false.
name (get, set) The name of the object.
name_find Find a child object with the given name and return it.
parent (get, set) The parent of an object.
provider_find Searches upwards in the object tree for a provider which knows the given class/interface.



callback,add A callback was added.
callback,del A callback was deleted.
del Object is being deleted.
destruct Object has been fully destroyed. It can not be used beyond this point. This event should only serve to clean up any dangling pointer.