1MONGOC_CLIENT_SET_APPNAME(3)       libmongoc      MONGOC_CLIENT_SET_APPNAME(3)
2
3
4

SYNOPSIS

6          bool
7          mongoc_client_set_appname (mongoc_client_t *client, const char *appname)
8
9       Sets  the  application  name  for  this client. This string, along with
10       other internal driver details, is sent to the server  as  part  of  the
11       initial connection handshake ("hello").
12
13       appname  is  copied, and doesn't have to remain valid after the call to
14       mongoc_client_set_appname().
15
16       This function will log an error  and  return  false  in  the  following
17       cases:
18
19appname is longer than MONGOC_HANDSHAKE_APPNAME_MAX
20
21client has already initiated a handshake
22
23client is from a mongoc_client_pool_t
24

PARAMETERS

26client: A mongoc_client_t.
27
28appname:  The  application  name,  of  length  at  most  MONGOC_HAND‐
29         SHAKE_APPNAME_MAX.
30

RETURNS

32       true if the appname is set successfully. Otherwise, false.
33

AUTHOR

35       MongoDB, Inc
36
38       2017-present, MongoDB, Inc
39
40
41
42
431.25.1                           Nov 08, 2023     MONGOC_CLIENT_SET_APPNAME(3)
Impressum