.\" Man page generated from reStructuredText. . .TH "MONGOC_CHANGE_STREAM_NEXT" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_change_stream_next \- mongoc_change_stream_next() . .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_change_stream_next (mongoc_change_stream_t *stream, const bson_t **bson); .ft P .fi .UNINDENT .UNINDENT .sp This function iterates the underlying cursor, setting \fBbson\fP to the next document. This will block for a maximum of \fBmaxAwaitTimeMS\fP milliseconds as specified in the options when created, or the default timeout if omitted. Data may be returned before the timeout. If no data is returned this function returns \fBfalse\fP\&. .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBstream\fP: A \fBmongoc_change_stream_t\fP\&. .IP \(bu 2 \fBbson\fP: The location for the resulting document. .UNINDENT .SH RETURNS .sp This function returns true if a valid bson document was read from the stream. Otherwise, false if there was an error or no document was available. .sp Errors can be determined with the \fBmongoc_change_stream_error_document\fP function. .SH LIFECYCLE .sp Similar to \fBmongoc_cursor_next\fP the lifetime of \fBbson\fP is until the next call to \fBmongoc_change_stream_next\fP, so it needs to be copied to extend the lifetime. .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .