gnutls_heartbeat_enable(3)

πŸ’– gnutls_heartbeat_enable(3) πŸ’–

okay bestie, we're in the gnutls manual and today's main character is gnutls_heartbeat_enable β€” an API function, periodt. 🫢


✨ NAME ✨

gnutls_heartbeat_enable β€” literally an API function, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

void gnutls_heartbeat_enable(gnutls_session_t session, unsigned int
type);

look at her. she's a void, she takes two things, she doesn't return anything. unbothered. iconic. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” bestie this is a gnutls_session_t type, that's the whole tea πŸ“
  • unsigned int type β€” and this one is one of the GNUTLS_HB_* flags. pick your fighter ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the lore πŸ“–

If you call this function with the GNUTLS_HB_PEER_ALLOWED_TO_SEND type, GnuTLS will allow heartbeat messages to be received. And not only that β€” it also requests the peer to accept heartbeat messages. the way it does both?? multi-tasking queen πŸ’…

⚠️ real talk though: this function must be called prior to TLS handshake. do not come in late, she is not accepting tardy arrivals πŸ™ˆ

If the type you used is GNUTLS_HB_LOCAL_ALLOWED_TO_SEND, then the peer will be asked to accept heartbeat messages but not send ones. so like, receiving yes, sending no. boundaries, we love to see it πŸŽ€

And heads up β€” the function gnutls_heartbeat_allowed() can be used to test whether locally generated heartbeat messages can be accepted by the peer. use her for the vibe check πŸ‘€


⭐ SINCE ⭐

3.1.2 β€” an elder. she's been slaying since way back, no cap 🌈


πŸ’œ REPORTING BUGS πŸ’œ

found a bug? not me gatekeeping β€” go tell the people, fr fr:


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. so like β€” go ahead, share it, just keep the receipts bestie πŸ’–


🌈 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, no crumbs left 🧚

this has been gnutls 3.8.13, manual page gnutls_heartbeat_enable(3), mwah πŸ’‹ bye bestie, go call her before the handshake iykyk 🫢✨

πŸ“¦ where this page comes from