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 a gnutls_session_t type. 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 ms value 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_TIMEOUT instead 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:


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