From 012353aef5900fc4eaf284d0723bf013f73a622d Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 13 Nov 2020 19:16:11 +0300 Subject: [PATCH] Update JSON C++ example. --- example/cpp/README.md | 2 +- example/cpp/tdjson_example.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/example/cpp/README.md b/example/cpp/README.md index addc1d4f7..1658ade6f 100644 --- a/example/cpp/README.md +++ b/example/cpp/README.md @@ -21,4 +21,4 @@ cmake --build . Documentation for all available classes and methods can be found at https://core.telegram.org/tdlib/docs. -To run `tdjson_example` you may need to manually copy a `tdjson` shared library from `td/bin` to a directory containing built binaries. +To run the examples you may need to manually copy needed shared libraries from `td/bin` to a directory containing built binaries. diff --git a/example/cpp/tdjson_example.cpp b/example/cpp/tdjson_example.cpp index 5d69c4e21..62978f178 100644 --- a/example/cpp/tdjson_example.cpp +++ b/example/cpp/tdjson_example.cpp @@ -18,6 +18,9 @@ int main() { int client_id = td_create_client(); // somehow share the client_id with other threads, which will be able to send requests via td_send + // start the client by sending request to it + td_send(client_id, "{\"@type\":\"getOption\", \"name\":\"version\"}"); + const bool test_incorrect_queries = false; if (test_incorrect_queries) { td_execute("{\"@type\":\"setLogVerbosityLevel\", \"new_verbosity_level\":1}");