gnutls_db_set_retrieve_function(3)
π gnutls_db_set_retrieve_function(3) π
okay bestie, welcome to the gnutls manual, page for gnutls_db_set_retrieve_function. yes that's a mouthful, we're gonna get through it together π«Ά
β¨ NAME β¨
gnutls_db_set_retrieve_function β it's an API function, that's the whole vibe π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
void gnutls_db_set_retrieve_function(gnutls_session_t session,
gnutls_db_retr_func retr_func);
π ARGUMENTS π
gnutls_session_t sessionβ bestie this is literally just agnutls_session_ttype. that's it. that's the arg β¨gnutls_db_retr_func retr_funcβ and this one? it's the function. the whole point. the moment π
π¦ DESCRIPTION π¦
so here's the tea β β this sets the function that's gonna be used to retrieve data from the resumed sessions database. like, when gnutls needs to go grab a session back out of the db, this is the little guy it calls π
that function has a job and the job is very specific, no cap:
- on success, it must return a
gnutls_datum_tcontaining the data - on failure, it must return a
gnutls_datum_tcontaining null and0
that's the whole contract, fr fr.
β οΈ okay important one: the datum's data must be allocated using the functiongnutls_malloc(). do not freestyle this. do not get cute with it.gnutls_malloc(). periodt π
and one more detail that lowkey matters: the first argument to retr_func is gonna be null unless you've called gnutls_db_set_ptr(). so if you're out here wondering why your pointer is giving nothing... that's why, bestie π
π REPORTING BUGS π
found a bug? don't gatekeep it, tell the devs:
- report bugs to <bugs@gnutls.org>
- home page:
https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
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.
(yes you can share it, just keep the receipts π§Ύβ¨)
π SEE ALSO π
the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:
https://www.gnutls.org/manual/
and that's the page, bestie! this was the gnutls manual, version 3.8.13, and the page was gnutls_db_set_retrieve_function(3). go forth and retrieve those sessions, you absolute icon ππβ¨
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms