Name

lcb_flush_buffers — Try to flush internal buffers

Synopsis

cc [ flag … ] file… -lcouchbase [ library … ]

#include <libcouchbase/couchbase.h>
void lcb_flush_buffers(lcb_t instance, const void * reserved);

DESCRIPTION

lcb_flush_buffers() tries to drain the send and receive buffers for the specified instance. The reserved parameter is as the name implies reserved and should be set to NULL. During flushing you must be prepared for receiving callbacks from libcouchbase.

EXAMPLES

#include <libcouchbase/couchbase.h>
...
lcb_t instance;
...
do {
    ...
    /* schedule a lot of operations to libcouchbase */
    ...
    /* ship as much as we can to the server (and handle everything
     * we've received so far
     */
    lcb_flush_buffers(instance);
} while (i_have_more_to_do);
...

ATTRIBUTES

See lcb_attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE

Interface Stability

Committed

MT-Level

MT-Safe

COPYRIGHT

Copyright 2010-2013 Couchbase, Inc.

SEE ALSO

Learn more at http://www.couchbase.com/communities/c.

libcouchbase(3lib), lcb_create(3couchbase), lcb_attributes(5)