.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "MONGOC_CLIENT_SET_APPNAME" "3" "May 07, 2024" "1.27.1" "libmongoc" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX bool mongoc_client_set_appname (mongoc_client_t *client, const char *appname) .EE .UNINDENT .UNINDENT .sp Sets the application name for this client. This string, along with other internal driver details, is sent to the server as part of the initial connection handshake (\fI\%\(dqhello\(dq\fP). .sp \fBappname\fP is copied, and doesn\(aqt have to remain valid after the call to \fBmongoc_client_set_appname()\fP\&. .sp This function will log an error and return false in the following cases: .INDENT 0.0 .IP \(bu 2 \fBappname\fP is longer than \fBMONGOC_HANDSHAKE_APPNAME_MAX\fP .IP \(bu 2 \fBclient\fP has already initiated a handshake .IP \(bu 2 \fBclient\fP is from a \fI\%mongoc_client_pool_t\fP .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBclient\fP: A \fI\%mongoc_client_t\fP\&. .IP \(bu 2 \fBappname\fP: The application name, of length at most \fBMONGOC_HANDSHAKE_APPNAME_MAX\fP\&. .UNINDENT .SH RETURNS .sp true if the appname is set successfully. Otherwise, false. .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .