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.

Since 1.19

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]

Call the object's constructor.
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]

Call the object's destructor.
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_destructor (get, set) If true will automatically close() on object destructor.
close_on_exec (get, set) If true will automatically close resources on exec() calls.
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
loop (get) The loop to which this object belongs to.
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, set) If true will notify object was closed.
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 Called at the end of efl_add. Should not be called, just overridden.
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 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.
debug_name_override Build a read-only name for this object used for debugging.
del Unrefs the object and reparents it to NULL.
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.
provider_find Searches upwards in the object tree for a provider which knows the given class/interface.

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