| 2782 | } |
| 2783 | |
| 2784 | bool cbm_daemon_runtime_client_heartbeat(cbm_daemon_runtime_client_t *client, uint32_t timeout_ms) { |
| 2785 | if (!client) { |
| 2786 | return false; |
| 2787 | } |
| 2788 | uint8_t *response = NULL; |
| 2789 | if (!runtime_client_exchange(client, CBM_DAEMON_RUNTIME_OP_HEARTBEAT, NULL, 0, timeout_ms, |
| 2790 | &response, STATUS_RESPONSE_SIZE)) { |
| 2791 | return false; |
| 2792 | } |
| 2793 | bool valid = runtime_get_u32(response) == 1; |
| 2794 | free(response); |
| 2795 | return valid; |
| 2796 | } |
| 2797 | |
| 2798 | bool cbm_daemon_runtime_client_application_token_reserve( |
| 2799 | cbm_daemon_runtime_client_t *client, cbm_daemon_runtime_application_token_t *token_out) { |