gnutls_handshake_set_timeout(3)
β¨ gnutls_handshake_set_timeout(3) β¨
okay bestie, so this one lives in the gnutls manual, and it's genuinely one of those little functions that saves your whole vibe. it's an API function, and it's here to stop your TLS handshake from just... hanging forever like a text you never got a reply to. π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
void gnutls_handshake_set_timeout(gnutls_session_t session, unsigned int
ms);
like, yes, that's the whole thing. short. iconic. does exactly one job.
π ARGUMENTS π
gnutls_session_t sessionβ bestie, this is agnutls_session_ttype. it's your session. your main character. π«Άunsigned int msβ this is a timeout value in milliseconds, so it's giving very precise, very "i have boundaries" energy. β³
π DESCRIPTION π
so what this does is it sets the timeout for the TLS handshake process to whatever value you handed it. that's it. that's the function. π¦
and here's the tea on the values:
- pass an
msvalue of zero and you disable the timeout entirely β no cap, it'll just wait forever, so know what you're doing π - pass
GNUTLS_DEFAULT_HANDSHAKE_TIMEOUTinstead and you get a reasonable default value, which is lowkey the move if you don't wanna think about it β¨
and for the DTLS protocol specifically, the more detailed gnutls_dtls_set_timeouts() is provided. so if you're on DTLS, that's your girl, not this one. π§
one more thing that is so important: this function requires you to set a pull timeout callback. see gnutls_transport_set_pull_timeout_function(). periodt. if you skip that, don't come crying to me. π
β SINCE β
3.1.0 β an elder, honestly. been holding it down since forever. π
π REPORTING BUGS π
found a bug? don't suffer in silence, bestie, report it:
- 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 to share, 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/
and that's the whole page, bestie!! π go forth and set your handshake timeout, your future self will thank you. this was gnutls version 3.8.13, brought to you by the gnutls_handshake_set_timeout(3) girlies. bye bestie, love u, hydrate!! π¦β¨πΈ
π¦ 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