| 3275 | } |
| 3276 | |
| 3277 | bool cbm_daemon_runtime_client_heartbeat(cbm_daemon_runtime_client_t *client, uint32_t timeout_ms) { |
| 3278 | if (!client) { |
| 3279 | return false; |
| 3280 | } |
| 3281 | uint8_t *response = NULL; |
| 3282 | if (!runtime_client_exchange(client, CBM_DAEMON_RUNTIME_OP_HEARTBEAT, NULL, 0, timeout_ms, |
| 3283 | &response, STATUS_RESPONSE_SIZE)) { |
| 3284 | return false; |
| 3285 | } |
| 3286 | bool valid = runtime_get_u32(response) == 1; |
| 3287 | free(response); |
| 3288 | return valid; |
| 3289 | } |
| 3290 | |
| 3291 | bool cbm_daemon_runtime_client_application_token_reserve( |
| 3292 | cbm_daemon_runtime_client_t *client, cbm_daemon_runtime_application_token_t *token_out) { |