.\" Man page generated from reStructuredText. . .TH "MONGOC_URI_GET_OPTION_AS_INT32" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_uri_get_option_as_int32 \- mongoc_uri_get_option_as_int32() . .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 .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C int32_t mongoc_uri_get_option_as_int32 (const mongoc_uri_t *uri, const char *option, int32_t fallback); .ft P .fi .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBuri\fP: A \fBmongoc_uri_t\fP\&. .IP \(bu 2 \fBoption\fP: The name of an option, case insensitive. .IP \(bu 2 \fBfallback\fP: A default value to return. .UNINDENT .SH DESCRIPTION .sp Returns the value of the URI option if it is set and of the correct type (integer). Returns \fBfallback\fP if the option is not set, set to an invalid type, or zero. .sp Zero is considered "unset", so URIs can be constructed like so, and still accept default values: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C bson_strdup_printf ("mongodb://localhost/?connectTimeoutMS=%d", myvalue) .ft P .fi .UNINDENT .UNINDENT .sp If \fBmyvalue\fP is non\-zero it is the connection timeout; if it is zero the driver uses the default timeout. .sp When reading an option that is an int64, this function will return the value as \fBint32_t\fP\&. If the value is outside the range of a 32\-bit integer, a warning will be emitted and \fBfallback\fP is returned instead. .SH SEE ALSO .INDENT 0.0 .IP \(bu 2 \fBmongoc_uri_get_option_as_int64()\fP .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .