gnutls_record_check_pending(3)
π gnutls_record_check_pending β the API function, bestie π
okay so this is one of those little pages from the gnutls manual, section 3 (that's the library-functions section, iykyk), and honestly? it's a short one but it's a lifesaver. let's get into it π«Ά
β¨ NAME β¨
gnutls_record_check_pending β API function
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
size_t gnutls_record_check_pending(gnutls_session_t session);
π ARGUMENTS π
gnutls_session_t sessionβ bestie. it's agnutls_session_ttype. that's the vibe. that's the whole argument.
π¦ DESCRIPTION π¦
okay so what does this even do π
this function checks if there are unread data in the gnutls buffers. literally that's it, it's a peek, it's a lil vibe check on your session.
and here's the iconic part: if the return value is non-zero, then the next call to gnutls_record_recv() is guaranteed not to block. no cap. so if you're the kind of person who hates getting stuck waiting on a socket (and who isn't, honestly π), you check first, and then you recv with your whole chest. main character energy fr fr.
β RETURNS β
returns the size of the data, or zero. that's it, that's the whole return value. no drama π
π REPORTING BUGS π
found something cursed? 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. slay, honestly. free as in freedom, periodt. π
π₯ 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 whole page, bestie, no crumbs left π this was gnutls_record_check_pending(3) from the gnutls manual, version 3.8.13. go forth and check your buffers before you recv, your future self will thank you πβ¨
π¦ 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