.\" Man page generated from reStructuredText. . .TH "MONGOC_TOPOLOGY_DESCRIPTION_HAS_WRITABLE_SERVER" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_topology_description_has_writable_server \- mongoc_topology_description_has_writable_server() . .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 bool mongoc_topology_description_has_writable_server ( mongoc_topology_description_t *td); .ft P .fi .UNINDENT .UNINDENT .sp Determines if the topology has a writable server available, such as a primary, mongos, or standalone. This function uses the driver\(aqs current knowledge of the state of the MongoDB server or servers it is connected to; it does no I/O and it does not block. .sp Use this function in a topology\-changed callback registered with \fBmongoc_apm_set_topology_changed_cb\fP\&. For historical reasons, the \fBmongoc_topology_description_t\fP passed to the callback is a const pointer, you must cast away const to pass the pointer to \fBmongoc_topology_description_has_writable_server\fP\&. .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBtd\fP: A \fBmongoc_topology_description_t\fP\&. .UNINDENT .SH RETURNS .sp True if there is a known writable server. .SH SEE ALSO .sp Introduction to Application Performance Monitoring .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .