MEMCACHED_S...L_CALLBACKS(3)
π MEMCACHED_S...L_CALLBACKS(3) π
okay bestie, sit down, hydrate, because today we're talking about the libmemcached-awesome manual page for SASL callbacks. yes that's a lot of consonants. no you don't have to be scared. i got you π«Ά
β¨ NAME β¨
memcached_set_sasl_callbacks β libmemcached Documentation
like, that's the whole name section. it's giving minimal. we love that for it π
πΈ SYNOPSIS πΈ
#include <libmemcached/memcached.h>
and bestie, you gotta compile and link with -lmemcached, no cap.
void memcached_set_sasl_callbacks(memcached_st *ptr, const
sasl_callback_t *callbacks)
Parameters
ptrβ pointer to initializedmemcached_ststructcallbacksβ pointer tosasl_callbacks_tholding the callbacks to use
const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
Parameters
ptrβ pointer to initializedmemcached_ststruct
Returns
pointer to sasl_callbacks_t holding the callbacks currently used
memcached_return_t memcached_set_sasl_auth_data(memcached_st *ptr, const
char *username, const char *password)
Parameters
ptrβ pointer to initializedmemcached_ststructusernameβ (yes queen, that's literally all it says)passwordβ (same energy)
Returns
memcached_return_t indicating success
memcached_return_t memcached_destroy_sasl_auth_data(memcached_st *ptr)
Parameters
ptrβ pointer to initializedmemcached_ststruct
Returns
memcached_return_t indicating success
π¦ DESCRIPTION π¦
okay so here's the tea β β libmemcached lets you plug in your own callbacks function that libsasl uses to do SASL authentication. your callbacks, your rules, main character energy only.
β οΈ bestie, listen. SASL requires the memcached binary protocol, and you have to specify the callbacks before you connect to the server. not after. before. the vibes are strict on this one. π
memcached_set_sasl_auth_data() is a lil helper function that defines the basic functionality for you β but heads up, it will store the username and password in memory. so if you choose to use this method you have to call memcached_destroy_sasl_auth_data() before calling memcached_free() to avoid a memory leak. do not skip this step, i am begging π
π¨ and you should NOT callmemcached_destroy_sasl_auth_data()if you specify your own callback function withmemcached_set_sasl_callbacks(). like, don't. that's not your moment.
β RETURN VALUE β
memcached_get_sasl_callbacks() returns the callbacks currently used by this memcached handle. memcached_set_sasl_auth_data() returns MEMCACHED_SUCCESS upon success. slay β¨
π SEE ALSO π
and that's the whole page, bestie π this lil icon was brought to you by libmemcached-awesome, version 1.1, dated Jul 24, 2025 β go forth and authenticate responsibly πππ¦
π¦ where this page comes from
- fedora 43: libmemcached-awesome-devel 1.1.4-7.fc43 Β· BSD-3-Clause
- fedora 43: libmemcached-awesome-devel 1.1.4-7.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms