efl_net_server_udp: initial UDP server.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Fri, 21 Oct 2016 15:24:02 +0000 (13:24 -0200)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Fri, 21 Oct 2016 15:33:27 +0000 (13:33 -0200)
commit7493368e5412002c4eca3bf651b21e01234da0f9
treee5ce747d27262f9866c6400cceba7aad221fc489
parent3cb15c17e01bd86220891b3ad4ea755f934e19d6
efl_net_server_udp: initial UDP server.

This is the initial UDP server that works similarly to the TCP one,
however under the hood it's widely different since the socket is
reused for all "clients", thus needs a new Efl.Net.Server.Udp.Client
(Efl.Net.Socket) as Efl.Net.Socket.Udp exposes the fd and options such
as 'cork', which would interfere in other clients.

The main socket will read the packets and find an existing client to
feed it. If no client exists, then it will create one if not overr
limit. Since there is no kernel-queuing as done by listen()/accept(),
the 'no reject' case will just accept the client anyway.

Next commits will improve UDP server handling with some advanced
features:

 - join multicast groups
 - bind to a specific interface (SO_BINDTODEVICE)
 - block packets going out of local network (SO_DONTROUTE)
 - specify priorities (SO_PRIORITY)
src/Makefile_Ecore_Con.am
src/examples/ecore/efl_net_server_example.c
src/lib/ecore_con/Ecore_Con_Eo.h
src/lib/ecore_con/ecore_con_private.h
src/lib/ecore_con/efl_net_server_udp.c [new file with mode: 0644]
src/lib/ecore_con/efl_net_server_udp.eo [new file with mode: 0644]
src/lib/ecore_con/efl_net_server_udp_client.c [new file with mode: 0644]
src/lib/ecore_con/efl_net_server_udp_client.eo [new file with mode: 0644]
src/lib/ecore_con/efl_net_socket_udp.eo