Name

lcb_connect — Initiate connect sequence

Synopsis

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

#include <libcouchbase/couchbase.h>
lcb_error_t lcb_connect(lcb_t *instance);

DESCRIPTION

Before libcouchbase may be used it must establish a connection to the Couchbase cluster to fetch the topology of the cluster. lcb_connect() initates the connect sequence, and the configuration callback specified with lcb_set_configuration_callback(3couchbase) is called when the topology is retrieved (or the error callback is called if an error occurs such as an incorrect host name etc).

RETURN VALUES

lcb_connect() returns the LCB_SUCCESS on success, or a specific error code upon failure. See lcb_strerror(3couchbase) for more information.

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_set_error_callback(3couchbase), lcb_set_configuration_callback(3couchbase) lcb_attributes(5)