gsasl_server_application_data_set(3)

πŸ“¦ version 1.10.0, in ubuntu jammy

πŸ’– gsasl_server_application_data_set(3) πŸ’–

okay bestie so you're deep in the gsasl man pages and you landed on this one, welcome, pull up a chair 🫢 this is from the gsasl manual, section 3, and it's a little baby function that stores your stuff for later. let's get into it ✨


🌸 NAME 🌸

gsasl_server_application_data_set β€” it's an API function, that's the whole vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gsasl.h>

void gsasl_server_application_data_set(Gsasl_session * sctx, void *
application_data);

like, look at her. two arguments, returns nothing, does exactly one thing. minimalist queen πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • Gsasl_session * sctx β€” this is your libgsasl server handle. the session object. the main character of the operation fr fr.
  • void * application_data β€” an opaque pointer to whatever application specific data you want to stash in there. opaque means you know what it is and libgsasl does not, and honestly? respect. it's giving mystery πŸ•΅οΈ

✨ DESCRIPTION ✨

so what this does is: it stores application specific data inside that libgsasl server handle. that's it. that's the job.

and then later β€” for instance, when you're inside a callback β€” you can get it back by calling gsasl_server_application_data_get(). bestie it's literally a little locker, you put your stuff in, you come back for it later πŸ”

the way this is normally used is by the application to maintain state between the main program and the callback. because your callback doesn't have your local variables, and you're not about to make everything a global, so you tuck a pointer in here and pull it back out when the callback fires. iconic behaviour, no cap πŸ’–


πŸ’€ DEPRECATED πŸ’€

⚠️ okay so this is the part where I have to be serious for one second. This function is DEPRECATED. Do not start new code on it.

Use gsasl_callback_hook_set() or gsasl_session_hook_set() instead. those are the glow-up versions, this one is the 2002 original. it still works but it's lowkey retired 😭


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? found something cursed? tell the gsasl people, they want to know:

pls be nice and pls include details, bug reports without details are giving "it doesn't work" and that helps nobody πŸ₯Ί


Copyright Β© 2002-2021 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.

like, copy it, remix it, put it in a zine, just keep the copyright notice and this notice attached. that's the deal and it's a very generous deal fr fr 🫢


🌈 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, this command:

info gsasl

should give you access to the complete manual. and if that doesn't work for whatever reason, as an alternative you may obtain the manual from:

http://www.gnu.org/software/gsasl/manual/

go read the whole thing, the full manual is where the lore lives πŸ“šβœ¨


and that's the page, bestie πŸ’œ this one came out of gsasl version 1.10.0, and yeah, it's a little vintage but it's still doing its thing. stay hydrated, check your pointers, and always free what you malloc πŸŒΈπŸ’…βœ¨

πŸ“¦ where this page comes from