gnutls_record_uncork(3)

✨ gnutls_record_uncork β€” the manual page, but make it make sense ✨

okay bestie, gather round πŸ’– this is a page from the gnutls manual set, and today's main character is gnutls_record_uncork(3). yes the whole name is giving "un-cork the bottle" energy, and honestly? that's exactly what it does. 🍾


🌸 NAME 🌸

gnutls_record_uncork β€” it's an API function, bestie. that's the whole vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/gnutls.h>

int gnutls_record_uncork(gnutls_session_t session, unsigned int flags);

look at her. so small. so powerful. πŸ¦‹


🫢 ARGUMENTS 🫢

  • gnutls_session_t session β€” it's a gnutls_session_t type, periodt. that's your session, your whole situation, the thing you're uncorking. πŸ”₯
  • unsigned int flags β€” lowkey flexible: this could be zero, or it could be GNUTLS_RECORD_WAIT. those are the options, no cap.

πŸ’– DESCRIPTION πŸ’–

so here's the tea: this function resets the effect of gnutls_record_cork() and flushes any pending data. un-corked. released. free. πŸ•ŠοΈ

if you specify the GNUTLS_RECORD_WAIT flag, then this function will block until the data is sent or a fatal error occurs β€” and by "block" we mean it will literally just retry on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED until it gets somewhere. she's patient. she's committed. she's not leaving until the data is out the door. πŸ’…

but listen β€” if GNUTLS_RECORD_WAIT is not specified and the function gets interrupted, then the GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED errors will be returned right back at you. no retry, no waiting, just vibes and an error code. 😭

and if you wanna know how much data is still sitting in that corked buffer, use gnutls_record_check_corked(). that's your peek behind the curtain. 🧚


⭐ RETURNS ⭐

on success you get the number of transmitted data returned to you. otherwise? a negative error code. that's it, that's the deal. πŸ™ˆ


🌈 SINCE 🌈

3.1.9 β€” she's been iconic since 3.1.9, iykyk πŸ‘‘


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me being the one to tell you, but fr fr, 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.


πŸ“ 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/

ngl, if you're reading this and you still don't get it β€” the cork goes on, the cork comes off, and GNUTLS_RECORD_WAIT is the difference between "bestie i'll wait for you" and "oop, interrupted, try again later". πŸ’–

anyway, that's the whole page!! this was gnutls_record_uncork(3) from gnutls 3.8.13 β€” slay, mwah, go flush your buffers πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from