Efl.Net.Socket_Udp (class)

Description

A base UDP socket.

This is the common class and takes an existing FD, usually created by an dialer.

Since for the server 'clients' there is no accepted connection it will reuse the same file decriptor. To avoid it being closed, another class Efl.Net.Server_Udp_Client is used instead.

Inheritance

Efl.Net.Socket_Fd (class)Efl.Loop_Fd (class)Efl.Loop_Consumer (class)Efl.Object (class)

Full hierarchy

Members

bind (get, set)

Forces binding to a specific address.
const char *efl_net_socket_udp_bind_get(const Eo *obj);
Eina_Error efl_net_socket_udp_bind_set(Eo *obj, const char *address);


constructor [Overridden from Efl.Object]

Implement this method to provide optional initialization code for your object.
Efl_Object *efl_constructor(Eo *obj);


cork (get, set)

Controls UDP's cork using UDP_CORK
Eina_Bool efl_net_socket_udp_cork_get(const Eo *obj);
Eina_Bool efl_net_socket_udp_cork_set(Eo *obj, Eina_Bool cork);


destructor [Overridden from Efl.Object]

Implement this method to provide deinitialization code for your object if you need it.
void efl_destructor(Eo *obj);


dont_route (get, set)

Avoids sent UDP packets being routed by a gateway, limiting them to the local network.
Eina_Bool efl_net_socket_udp_dont_route_get(const Eo *obj);
Eina_Bool efl_net_socket_udp_dont_route_set(Eo *obj, Eina_Bool dont_route);


fd (get, set) [Overridden from Efl.Loop_Fd]

Defines which file descriptor to watch. If it is a file, use file_fd variant.
int efl_loop_fd_get(const Eo *obj);
void efl_loop_fd_set(Eo *obj, int fd);


multicast_groups_get

Returns the multicast groups this server has joined.
Eina_Iterator *efl_net_socket_udp_multicast_groups_get(Eo *obj);


multicast_join

Joins a multicast group.
Eina_Error efl_net_socket_udp_multicast_join(Eo *obj, const char *address);


multicast_leave

Leaves a multicast group.
Eina_Error efl_net_socket_udp_multicast_leave(Eo *obj, const char *address);


multicast_loopback (get, set)

Controls whenever multicast will loopback packets locally.
Eina_Bool efl_net_socket_udp_multicast_loopback_get(const Eo *obj);
Eina_Error efl_net_socket_udp_multicast_loopback_set(Eo *obj, Eina_Bool loopback);


multicast_time_to_live (get, set)

Controls time to live in number of hops.
uint8_t efl_net_socket_udp_multicast_time_to_live_get(const Eo *obj);
Eina_Error efl_net_socket_udp_multicast_time_to_live_set(Eo *obj, uint8_t ttl);


next_datagram_size_query

Queries the next datagram size.
size_t efl_net_socket_udp_next_datagram_size_query(Eo *obj);


read [Overridden from Efl.Io.Reader]

Reads data into a pre-allocated buffer.
Eina_Error efl_io_reader_read(Eo *obj, Eina_Rw_Slice rw_slice);


reuse_address (get, set)

Controls address reuse() using SO_REUSEADDR
Eina_Bool efl_net_socket_udp_reuse_address_get(const Eo *obj);
Eina_Bool efl_net_socket_udp_reuse_address_set(Eo *obj, Eina_Bool reuse_address);


reuse_port (get, set)

Controls port reuse() using SO_REUSEPORT (since Linux 3.9)
Eina_Bool efl_net_socket_udp_reuse_port_get(const Eo *obj);
Eina_Bool efl_net_socket_udp_reuse_port_set(Eo *obj, Eina_Bool reuse_port);


write [Overridden from Efl.Io.Writer]

Writes data from a pre-populated buffer.
Eina_Error efl_io_writer_write(Eo *obj, Eina_Slice slice, Eina_Slice *remaining);


init protected

Initializes the socket to communicate with a given IP address
void efl_net_socket_udp_init(Eo *obj, Efl_Net_Ip_Address *remote_address);


Inherited

Efl.Io.Closer_Fd
close_on_exec (get, set) If true will automatically close resources on exec() calls.
close_on_invalidate (get, set) If true will automatically close() on object invalidate.
protected set closer_fd (get, set) Closer file descriptor
Efl.Io.Reader_Fd
protected set reader_fd (get, set) Reader file descriptor
Efl.Io.Writer_Fd
protected set writer_fd (get, set) Writer file descriptor
Efl.Loop_Consumer
future_rejected Creates a new future that is already rejected to a specified error using the Efl.Loop_Consumer.loop.get.
future_resolved Creates a new future that is already resolved to a value.
loop (get)
promise_new Create a new promise with the scheduler coming from the loop provided by this object.
Efl.Loop_Fd
fd_file (get, set) Defines which file descriptor to watch when watching a file.
parent (get, set) The parent of an object.
Efl.Net.Socket_Fd
protected set address_local (get, set) The local address, similar to getsockname().
protected set address_remote (get, set) The remote address, similar to getpeername().
protected set can_read (get, set) If true will notify Efl.Io.Reader.read can be called without blocking or failing.
protected set can_write (get, set) If true will notify Efl.Io.Writer.write can be called without blocking or failing.
close Closes the Input/Output object.
closed (get)
protected set eos (get, set) If true will notify end of stream.
protected set family (get, set) The address family (AF_*) family of this socket.
finalize Implement this method to finish the initialization of your object after all (if any) user-provided configuration methods have been executed.
invalidate Implement this method to perform special actions when your object loses its parent, if you need to.
Efl.Object
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 children.
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.
debug_name_override Build a read-only name for this object used for debugging.
event_callback_forwarder_del Remove an event callback forwarder for a specified event and object.
event_callback_forwarder_priority_add Add an event callback forwarder that will make this object emit an event whenever another object (source) emits it. The event is said to be forwarded from source to this object.
event_callback_stop Stop the current callback call.
event_freeze Freeze events of this object.
event_freeze_count (get)
static event_global_freeze Globally freeze events for ALL EFL OBJECTS.
static event_global_freeze_count (get)
static event_global_thaw Globally thaw events for ALL EFL OBJECTS.
event_thaw Thaw events of object.
finalized (get)
invalidated (get)
invalidating (get)
name (get, set) The name of the object.
name_find Find a child object with the given name and return it.
provider_find Searches upwards in the object tree for a provider which knows the given class/interface.
provider_register Will register a manager of a specific class to be answered by Efl.Object.provider_find.
provider_unregister Will unregister a manager of a specific class that was previously registered and answered by Efl.Object.provider_find.

Events

Inherited

Efl.Io.Closer
closed Notifies closed, when property is marked as true
Efl.Io.Reader
can_read,changed Notifies can_read property changed.
eos Notifies end of stream, when property is marked as true.
Efl.Io.Writer
can_write,changed Notifies can_write property changed.
Efl.Loop_Fd
error Called when a error occurred on the file descriptor
read Called when a read happened on the file descriptor
write Called when a write happened on the file descriptor
Efl.Object
del Object is being deleted. See Efl.Object.destructor.
destruct Object has been fully destroyed. It can not be used beyond this point. This event should only serve to clean up any reference you keep to the object.
invalidate Object is being invalidated and losing its parent. See Efl.Object.invalidate.
noref Object has lost its last reference, only parent relationship is keeping it alive. Advanced usage.
ownership,shared Object has acquired a second reference. It has multiple owners now. Triggered whenever increasing the refcount from one to two, it will not trigger by further increasing the refcount beyond two.
ownership,unique Object has lost a reference and only one is left. It has just one owner now. Triggered whenever the refcount goes from two to one.