未验证 提交 08e0765b 编写于 作者: B Bo Ding 提交者: GitHub

docs: update subscribe_demo.c

上级 73ed6c9c
// A simple demo for asynchronous subscription.
// compile with:
// gcc -o subscribe_demo subscribe_demo.c -ltaos
......@@ -52,6 +53,8 @@ int main() {
int interval = 2000; // consumption interval in microseconds.
TAOS_SUB* tsub = taos_subscribe(taos, restart, topic, sql, subscribe_callback, NULL, interval);
// wait for insert from others process. you can open TDengine CLI to insert some records for test.
getchar(); // press Enter to stop
printf("total rows consumed: %d\n", nTotalRows);
......@@ -60,4 +63,4 @@ int main() {
taos_close(taos);
taos_cleanup();
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册