Implementions should call this method to announce new clients.

This method will account the new client in Efl.Net.Server.clients_count as well as emit the event "client,add".

After this call, the client ownership will be managed. If no event handler references the object, it will be deleted.

Most implementions will do the sequence:

- emit "client,add"

- check if client was referenced

- if we're not the parent anymore, ignore (do not change Efl.Net.Server.clients_count) and return true.

- if not referenced, delete it and return false.

- if it's closed, delete it and return false.

- if referenced, increment Efl.Net.Server.clients_count and monitor for client "closed" event and return true.

- on client "closed", decrease Efl.Net.Server.clients_count and unset its parent (if we're still the parent).

Do not monitor "closed" before emitting "client,add". Doing so may lead to double free if callbacks close the client by themselves!

Since 1.19


client_announce @protected @pure_virtual {
    params {
        @in client: free(Efl.Net.Socket, efl_del);
    return: bool (false);

C signature

Eina_Bool efl_net_server_client_announce(Eo *obj, Efl_Net_Socket *client);


  • client (in) - A socket representing the client.

Implemented by