Skip to content

Commit 4dcc78c

Browse files
author
Christian Hergert
committed
doc: add some comments to our connection examples.
1 parent 9ec03f5 commit 4dcc78c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/advanced-connections.page

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ main (int argc,
5252

5353
mongoc_init ();
5454

55+
/* Create our MongoDB Client */
5556
client = mongoc_client_new ("mongodb://myreplset01:27017/?replicaSet=myreplset");
57+
58+
/* do something with client ... */
59+
60+
/* Free our client */
5661
mongoc_client_destroy (client);
5762

5863
mongoc_cleanup ();
@@ -100,7 +105,12 @@ main (int argc,
100105

101106
mongoc_init ();
102107

108+
/* Create our MongoDB Client */
103109
client = mongoc_client_new ("mongodb://myshard01:27017/");
110+
111+
/* Do something with client ... */
112+
113+
/* Free the client */
104114
mongoc_client_destroy (client);
105115

106116
mongoc_cleanup ();

0 commit comments

Comments
 (0)