GNUTLS_TRANSPORT_SET_PULL_FUNCTION(3)

πŸ’– gnutls_transport_set_pull_function β€” API function πŸ’–

okay bestie, welcome to the gnutls manual, you're gonna eat this up ✨


🌸 NAME 🌸

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


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/gnutls.h>

void gnutls_transport_set_pull_function(gnutls_session_t session,
gnutls_pull_func pull_func);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_session_t session β€” this one is a gnutls_session_t type. that's it, that's the whole description, no cap 🫢
  • gnutls_pull_func pull_func β€” a callback function that's giving major read() energy, iykyk 😌

✨ DESCRIPTION ✨

so like, this is the function where you set a function for gnutls to receive data. 🧚

ngl, if you're using berkeley style sockets, you do not need to use this function, because the default recv(2) will probably be ok. like, it just works, bestie. πŸ’…

but if you <em>do</em> write your own callback, here's the tea on what it has to return:

  • 0 β€” connection termination, we're done here 😭
  • a positive number β€” that's the number of bytes received, slay πŸ‘‘
  • -1 β€” error. it's giving tragedy πŸ’€

and here's the shape of gnutls_pull_func, exactly as written, no edits:

ssize_t
(*gnutls_pull_func)(gnutls_transport_ptr_t, void*, size_t);

periodt. πŸ’–


πŸ”₯ REPORTING BUGS πŸ”₯

found a bug? not you being a detective πŸ•΅οΈβ€β™€οΈ report it to <bugs@gnutls.org>.

home page is right here: https://www.gnutls.org


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. iconic behavior, honestly. πŸŽ€


⭐ 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/

fr fr, don't skip the docs bestie, they're lowkey the main character. πŸ’–

that's the whole page! this was gnutls 3.8.13, brought to you with love, sparkles, and a little bit of -1 on error energy. stay hydrated, read your manpages, mwah πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from