examples/client.c: update client example

Now, the client is more structurized and
explores how the clienty should be used with
its API