Memcac...ed_sasl(3pm)
π NAME π
ok so bestie, gather round β these are the SASL girlies:
memcached_set_sasl_callbacksmemcached_get_sasl_callbacksmemcached_sasl_set_auth_datamemcached_destroy_sasl_auth_data
they're all about SASL support, no cap. π
π LIBRARY π
C Client Library for memcached β that's libmemcached, link it with -lmemcached. π«Ά
β¨ SYNOPSIS β¨
#include <memcached.h>
void memcached_set_sasl_callbacks(memcached_st *ptr,
const sasl_callback_t *callbacks)
const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
const char *username,
const char *password)
memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
πΈ DESCRIPTION πΈ
libmemcached(3) lets you plug in your own callbacks function that libsasl uses to do its SASL authentication thing. it's giving customizable. it's giving icon behavior. β¨
π¨ IMPORTANT VIBE CHECK: SASL requires the memcached binary protocol, and you have to specify the callbacks before you connect to the server. like, before. don't be late to this. π
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 go that route, you have to call memcached_destroy_sasl_auth_data before calling memcached_free, or you get a memory leak and that's not the vibe, that's giving leaky. π
β οΈ also: you should NOT callmemcached_destroy_sasl_auth_dataif you specified your own callback function withmemcached_set_sasl_callbacks(). don't do it!! not the move!! π
and ngl, there's homework on your side, bestie β you as the client user have to initialize libsasl by using sasl_client_init before enabling it in libmemcached, and you have to shut down libsasl by calling sasl_done() when you're done using SASL from libmemcached. π§ both ends. periodt.
π RETURN π
memcached_get_sasl_callbacks()β returns the callbacks currently used by this memcached handle. πmemcached_get_sasl_set_auth_data()β returnsMEMCACHED_SUCCESSupon success. slay. β
π HOME π
to find out more information please check: <http://libmemcached.org/> β literally the mothership. π¦
π AUTHOR π
Trond Norbye, <trond.norbye@gmail.com> π
π« SEE ALSO π«
and that's the whole page, bestie β written for perl v5.42.3, dated 2026-08-19, filed under Memcac...ed_sasl(3pm). πβ¨π
π¦ where this page comes from
- ubuntu stonking: libmemcached-libmemcached-perl 1.001801+dfsg-6build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms