| 2813 | } |
| 2814 | |
| 2815 | bool cbm_daemon_runtime_client_heartbeat(cbm_daemon_runtime_client_t *client, uint32_t timeout_ms) { |
| 2816 | if (!client) { |
| 2817 | return false; |
| 2818 | } |
| 2819 | uint8_t *response = NULL; |
| 2820 | if (!runtime_client_exchange(client, CBM_DAEMON_RUNTIME_OP_HEARTBEAT, NULL, 0, timeout_ms, |
| 2821 | &response, STATUS_RESPONSE_SIZE)) { |
| 2822 | return false; |
| 2823 | } |
| 2824 | bool valid = runtime_get_u32(response) == 1; |
| 2825 | free(response); |
| 2826 | return valid; |
| 2827 | } |
| 2828 | |
| 2829 | bool cbm_daemon_runtime_client_application_token_reserve( |
| 2830 | cbm_daemon_runtime_client_t *client, cbm_daemon_runtime_application_token_t *token_out) { |