gnutls_system_recv_timeout(3)
β¨ gnutls_system_recv_timeout(3) β¨
okay bestie, welcome to the gnutls manual, section 3 (that's the library-functions section, iykyk π
). today's episode: gnutls_system_recv_timeout, which is lowkey just "hey, is there data yet?" but make it timed. πΈ
π NAME π
gnutls_system_recv_timeout β it's an API function, and it's here to do exactly one thing and do it well. π
π¦ SYNOPSIS π¦
#include <gnutls/gnutls.h>
int gnutls_system_recv_timeout(gnutls_transport_ptr_t ptr, unsigned int
ms);
yes that's the whole thing. she's compact. she's iconic. π
π ARGUMENTS π
gnutls_transport_ptr_t ptrβ a file descriptor, except it's wrapped up all cozy in agnutls_transport_ptr_tpointer. like a little gift. πunsigned int msβ the number of milliseconds to wait. that's the patience budget, bestie. β³
π DESCRIPTION π
so what she does is: she waits for data to be received from the socket you handed her (ptr), but only within a timeout period measured in milliseconds. and how does she wait? she uses select() on the ptr you gave her. no cap. π«Ά
she's not out here being a whole transport by herself β she's a helper, a lil assist, for when you're building your own custom callbacks for gnutls_transport_set_pull_timeout_function(). you'd reach for her if you're the kind of person who relies on socket file descriptors. socket-fd girlies, this one's for you. π₯
and the return values? here's the vibe check:
- returns
-1on error π - returns
0on timeout π - returns a positive value if data are available for reading β¨
β SINCE β
3.4.0 β she's been around a minute. a veteran. a legend. π
π REPORTING BUGS π
found a bug? don't be shy, report it to <bugs@gnutls.org>. π§
Home page: https://www.gnutls.org β go say hi. π
πΈ 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: share her freely, just keep the receipts. 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, then bestie, go visit:
https://www.gnutls.org/manual/
that's the mothership. the main character documentation. go read her. πβ¨
and that's the whole page, bestie!! this was gnutls 3.8.13, gnutls_system_recv_timeout(3), brought to you by the gnutls crew. mwah. ππ¦π
π¦ 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