GNUTLS_TRANSPORT_SET_PUSH_FUNCTION(3)
π gnutls_transport_set_push_function(3) π
okay bestie, welcome to the gnutls manual, section 3 β yes, the crypto library that's carrying the whole internet on its back, and today we're looking at one very specific lil function. buckle up π
β¨ NAME β¨
gnutls_transport_set_push_function β API function π
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
void gnutls_transport_set_push_function(gnutls_session_t session,
gnutls_push_func push_func);
β¨ ARGUMENTS β¨
gnutls_session_t sessionβ bestie this is just agnutls_session_ttype. that's the whole vibe. your session. your girl. π«Άgnutls_push_func push_funcβ a callback function, and it's givingwrite(). same energy, different day. β¨
β¨ DESCRIPTION β¨
so like, this is THE function where you set a push function for gnutls to use in order to send data. that's it. that's the whole job. you're handing gnutls the little machine it uses to yeet bytes out into the world π
if you're gonna use berkeley style sockets, you do not need to use this function, because the default send(2) will probably be ok. like, it's fine. it's fine!! don't overthink it, she's got it π
otherwise?? you should specify this function so gnutls can actually send data. no push function, no bytes leaving the building. periodt.
the callback should return a positive number indicating the bytes sent, and -1 on error. that's the contract, bestie, don't break it π
push_funcis of the form,ssize_t (*gnutls_push_func)(gnutls_transport_ptr_t, const void*, size_t);
like, look at her. iconic signature. the way she takes a gnutls_transport_ptr_t, a const void*, and a size_tβ¦ chef's kiss π
π REPORTING BUGS π
found a bug? report it, don't sit on it fr fr:
- 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.
(translation: go off, 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/
iykyk π
and that's the page, bestie!! this was gnutls version 3.8.13, brought to you by the gnutls manual, section 3 β go set that push function and slay β¨π¦π
π¦ 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