5 .. index:: object: memcached_st
12 #include <libmemcached/memcached_pool.h>
14 .. c:function:: void memcached_set_sasl_callbacks(memcached_st *ptr, const sasl_callback_t *callbacks)
16 .. c:function:: const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
18 .. c:function:: memcached_return_t memcached_set_sasl_auth_data(memcached_st *ptr, const char *username, const char *password)
20 .. c:function:: memcached_return_t memcached_destroy_sasl_auth_data(memcached_st *ptr)
22 Compile and link with -lmemcached
31 libmemcached(3) allows you to plug in your own callbacks function used by
32 libsasl to perform SASL authentication.
34 Please note that SASL requires the memcached binary protocol, and you have
35 to specify the callbacks before you connect to the server.
37 :c:func:`memcached_set_sasl_auth_data` is a helper function defining
38 the basic functionality for you, but it will store the username and password
39 in memory. If you choose to use this method you have to call
40 :c:type:`memcached_destroy_sasl_auth_data` before calling
41 :c:type:`memcached_free` to avoid a memory leak. You should NOT call
42 :c:type:`memcached_destroy_sasl_auth_data` if you specify your own callback
43 function with :c:func:`memcached_set_sasl_callbacks`.
51 :c:func:`memcached_get_sasl_callbacks` returns the callbacks currently used by
52 this memcached handle. :c:func:`memcached_set_sasl_auth_data` returns
53 :c:type:`MEMCACHED_SUCCESS` upon success.
61 To find out more information please check:
62 `http://libmemcached.org/ <http://libmemcached.org/>`_
70 Brian Aker, <brian@tangent.org>
72 Trond Norbye, <trond.norbye@gmail.com>
80 :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`