1MONGOC_CLIENT_GET_SERVER_STATUS(3) libmongocMONGOC_CLIENT_GET_SERVER_STATUS(3)
2
3
4
6 mongoc_client_get_server_status - mongoc_client_get_server_status()
7
9 bool
10 mongoc_client_get_server_status (mongoc_client_t *client,
11 mongoc_read_prefs_t *read_prefs,
12 bson_t *reply,
13 bson_error_t *error) BSON_GNUC_DEPRECATED;
14
15 Queries the server for the current server status. The result is stored
16 in reply.
17
18 reply is always initialized, even in the case of failure. Always call
19 bson_destroy() to release it.
20
22 This helper function is deprecated and should not be used in new code.
23 Run the serverStatus command directly with mongoc_client_read_com‐
24 mand_with_opts() instead.
25
27 • client: A mongoc_client_t.
28
29 • read_prefs: A mongoc_read_prefs_t.
30
31 • reply: A location for the result bson_t.
32
33 • error: An optional location for a bson_error_t or NULL.
34
36 Errors are propagated via the error parameter.
37
39 Returns true if successful. Returns false and sets error if there are
40 invalid arguments or a server or network error.
41
43 MongoDB, Inc
44
46 2017-present, MongoDB, Inc
47
48
49
50
511.17.6 Jun 03, 2021MONGOC_CLIENT_GET_SERVER_STATUS(3)