Bernardo
got it ! thanks 🙂
anyways i got it working on websocket yesterday,
btw , the one i mention using c, i don't know if it is a bit outdated or it is just different when in c++
#include <sqlite3.h>
char *uri = "file:app.db?node=secondary&connect=tcp://server:port";
int main() {
sqlite3 *db;
/* open the database */
sqlite3_open(uri, &db);
/* check if the db is ready */
while(1){
char *json_str = sqlite3_query_value_str(db, "PRAGMA sync_status");
BOOL db_is_ready = strstr(json_str, "\"db_is_ready\": true") > 0;
sqlite3_free(json_str);
if (db_is_ready) break;
sleep_ms(250);
}
/* access the database */
start_access(db);
}
The code inside while loop , i changed it to sqlite3_exec,