Couchbase C Client
3.3.14
Asynchronous C Client for Couchbase
|
libuv integration
libuv is a cross platform event framework using a completion-based programming model. Since most distributions do not offer up-to-date libuv binary packages and because libuv is constantly evolving itself, binary packages are not provided. The source code for this plugin is actually shipped with the headers of libcouchbase.
If you built libuv together with libcouchbase (and thus there exists a library called libcouchbase_libuv
then you may simply include this file and initialize the iops structure.
Otherwise you should ensure that <libcouchbase/plugins/io/libuv/plugin-libuv.c>
is compiled into an object, and that the LCBUV_EMBEDDED_SOURCE
macro is defined for both the compiled object and any code in your application that is using the module, thus:
Then, in your application
And then compile as
LCBUV_API lcb_STATUS lcb_create_libuv_io_opts | ( | int | version, |
lcb_io_opt_t * | io, | ||
lcbuv_options_t * | options ) |
Use this if using an existing uv_loop_t.
version | Set this to 0 | |
[out] | io | a pointer to an io pointer. Will be populated on success |
options | the options to be passed. From libcouchbase this is a void* parameter. |
struct lcbuv_options_t |
Options passed to the iops constructure.
You will most likely want to set the 'startsop_noop' field to true if you are using an async application.
Data Fields | ||
---|---|---|
int | version | |
union lcbuv_options_t.v | v |