gnutls_transport_set_int2(3)
π gnutls_transport_set_int2(3) π
okay bestie, so this is a page from the gnutls manual, and it's literally just one tiny function that does one tiny thing and does it flawlessly. sit with me. π«Ά
β¨ NAME β¨
gnutls_transport_set_int2 β API function
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
void gnutls_transport_set_int2(gnutls_session_t session, int recv_fd,
int send_fd);
π ARGUMENTS π
gnutls_session_t sessionβ this is, and I quote, "agnutls_session_ttype." the session we're blessing with some file descriptors. she's the main character here. πint recv_fdβ the socket descriptor for the pull function. the receiving one. she listens. πint send_fdβ the socket descriptor for the push function. the sending one. she speaks. π£
π¦ DESCRIPTION π¦
so what does this actually do? it sets the first argument of the transport functions β think send() and recv() for the default callbacks that use the system's socket API. and the slay part? with this function you can set two different descriptors, one for receiving and one for sending. two fds. two vibes. no conflict. β¨
it's also equivalent to calling gnutls_transport_set_ptr2() with the descriptors, except β and this is the iconique detail β it requires no casts. none. zero. your compiler is not gonna be weird about it. periodt. π
β SINCE β
3.1.9 β she's been around. vintage but never dated. π
π REPORTING BUGS π
found a bug? don't gatekeep it, report it:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
not me asking you to actually email the mailing list instead of just complaining in the group chat π
π 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: take it, share it, remix 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/
lowkey the whole page is like five lines of lore but she ate anyway π
anyway bestie, that's the whole thing β gnutls 3.8.13, gnutls_transport_set_int2(3), and yes I did read all of it so you don't have to. go set your two descriptors. no casts. no notes. bye πβ¨π
π¦ 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