Skip to content

Commit 62d15c1

Browse files
committed
minor doc tweaks
1 parent 0664e56 commit 62d15c1

File tree

2 files changed

+15
-22
lines changed

2 files changed

+15
-22
lines changed

doc/C.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,22 @@
2727

2828
...
2929

30-
line_sender_error* err = NULL;
31-
line_sender_opts* opts = NULL;
32-
line_sender* sender = NULL;
33-
34-
line_sender_utf8 host = QDB_UTF8_LITERAL("localhost");
35-
opts = line_sender_opts_new(host, 9009, &err);
36-
if (!opts) {
37-
/* ... handle error ... */
38-
}
30+
line_sender_utf8 conf = QDB_UTF8_LITERAL(
31+
"http::addr=localhost:9000;");
3932

40-
sender = line_sender_build(opts, &err);
41-
line_sender_opts_free(opts);
42-
opts = NULL;
33+
line_sender_error* err = NULL;
34+
line_sender* sender = sender = line_sender_from_conf(&err);
4335
if (!sender) {
4436
/* ... handle error ... */
4537
}
4638

4739
```
4840

49-
The `opts` object can additionally take parameters for the outbound interface,
50-
authentication, full-connection encryption via TLS and more.
41+
See the main [client libraries](https://questdb.io/docs/reference/clients/overview/)
42+
documentation for the full config string params, including authentication, tls, etc.
43+
44+
You can also connect programmatically using `line_sender_opts_new_tcp` or
45+
`line_sender_opts_new_http`.
5146

5247
### Building Messages
5348

doc/CPP.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@
2727

2828
...
2929

30-
// Automatically connects on object construction.
31-
questdb::ingress::line_sender sender{
32-
"localhost", // QuestDB hostname
33-
9009}; // QuestDB port
30+
auto sender = questdb::ingress::line_sender::from_conf(
31+
"http::addr=localhost:1;");
3432

3533
```
3634

37-
For more advanced use cases, such as those requiring authentication or
38-
full-connection encryption via TLS, first, create an `opts` object then call its
39-
methods to populate its options and then pass the `opts` object to the
40-
`line_sender` constructor.
35+
See the main [client libraries](https://questdb.io/docs/reference/clients/overview/)
36+
documentation for the full config string params, including authentication, tls, etc.
37+
38+
You can also connect programmatically using the `questdb::ingress::opts` object.
4139

4240
### Building Messages
4341

0 commit comments

Comments
 (0)