clean network API and add recv_cb in daemon :

    - improve memory management : 0 leak
    - add receive callback in the daemon