gsasl_session_hook_set(3)

✨ gsasl_session_hook_set(3) ✨

okay bestie, gather round 🫢 this one lives in the gsasl manual and it's literally just a little pocket for your stuff. that's it. that's the whole vibe. πŸ’…


πŸ’– NAME πŸ’–

gsasl_session_hook_set β€” an API function, no cap


🌸 SYNOPSIS 🌸

#include <gsasl.h>

void gsasl_session_hook_set(Gsasl_session * sctx, void * hook);

πŸŽ€ ARGUMENTS πŸŽ€

  • Gsasl_session * sctx β€” your libgsasl session handle, the main character of this whole operation πŸ‘‘
  • void * hook β€” an opaque pointer to application specific data. opaque!! meaning libgsasl does not peek inside it, it just holds it for you, like a bestie holding your iced coffee πŸ§Šβ˜•

πŸ¦‹ DESCRIPTION πŸ¦‹

So the way this works is: you store application specific data right inside the libgsasl session handle. that's the whole job. stash it, done. πŸ’…

Later β€” for instance, inside a callback β€” that same application data can be retrieved by calling gsasl_session_hook_get(). so it's giving very much "put it in, get it out" energy. πŸ”„βœ¨

What is this normally used for, you ask? It's normally used by the application to maintain a per-session state between the main program and callbacks. yes bestie, your main program and your callbacks can share the same little vibes without shouting across the whole codebase. iconic, honestly. 🌈


⭐ SINCE ⭐

0.2.14 β€” an elder, but a cute one πŸ™ˆ


πŸ’€ REPORTING BUGS πŸ’€

Found something cursed? Report bugs to <bug-gsasl@gnu.org>. πŸ›

General guidelines for reporting bugs live here: https://www.gnu.org/gethelp/

And the GNU SASL home page is right here: https://www.gnu.org/software/gsasl/


Copyright © 2002-2026 Simon Josefsson. 🫢

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so yes, you may absolutely redistribute this, just keep the receipts. periodt. πŸ’–


🌈 SEE ALSO 🌈

The full documentation for gsasl is maintained as a Texinfo manual. if the info and gsasl programs are properly installed at your site, the command

info gsasl

should give you access to the complete manual. iykyk πŸ“–βœ¨

as an alternative, you may obtain the manual from:

https://www.gnu.org/software/libidn/gsasl/manual/

reminder bestie: gsasl_session_hook_set() puts the data in, gsasl_session_hook_get() takes it back out. the setter alone is not going to hand it back to you, that's not its job. πŸŽ€

and that's the page!! footer says this is gsasl version 2.2.4, and the page itself is gsasl_session_hook_set(3). slay, go forth and stash your session state responsibly πŸ’…πŸŒŸπŸ¦‹

πŸ“¦ where this page comes from