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, "a gnutls_session_t type." 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:

not me asking you to actually email the mailing list instead of just complaining in the group chat 😭

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