gnutls_dtls_set_timeouts(3)

✨ gnutls_dtls_set_timeouts(3) ✨

okay bestie, pull up a chair, we're diving into the gnutls manual β€” yes, the whole manual, it's giving reference-doc energy and we're eating it up πŸ’…


🌸 NAME 🌸

gnutls_dtls_set_timeouts β€” literally just an API function, that's the whole name, no notes πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/dtls.h>

void gnutls_dtls_set_timeouts(gnutls_session_t session, unsigned int
       retrans_timeout, unsigned int total_timeout);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” bestie this is a gnutls_session_t type. that's it, that's the arg 🫢
  • unsigned int retrans_timeout β€” the moment a retransmission is gonna happen, counted in milliseconds. so like, the clock starts ticking and this is when we go "hey, resend that" ⏰
  • unsigned int total_timeout β€” the moment the connection gets aborted, also in milliseconds. no more chances after this one, periodt πŸ’€

πŸ’œ DESCRIPTION πŸ’œ

so this function sets the timeouts that the DTLS handshake protocol needs. two of them. iconic duo behavior 🌈

The retransmission timeout is the time after which, if a message from the peer hasn't shown up, the previous messages get retransmitted. like, "hello?? you there?? sending again" πŸ“¨

The total timeout is the time after which the whole handshake gets aborted, and it dies with GNUTLS_E_TIMEDOUT. dramatic but necessary 😭

The DTLS protocol recommends the values of 1 sec and 60 seconds respectively, and those are the defaults. so if you don't touch anything, that's what you get, no cap ✨

⚠️ okay important one: to disable retransmissions, set a retrans_timeout larger than the total_timeout. yes, bigger. counterintuitive but that's the move, trust 🧚

⭐ SINCE ⭐

3.0 β€” been here since 3.0, a true veteran πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Found a bug? Report it to <bugs@gnutls.org>. they want to hear from you fr fr

Home page: 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. slay, free software rights 🫢


🌈 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, you understood it, I'm so proud of you πŸ’…βœ¨

this has been gnutls_dtls_set_timeouts(3) from gnutls 3.8.13 β€” go forth and set those timeouts, main character energy only πŸ‘‘πŸ¦‹

πŸ“¦ where this page comes from