gnutls_record_set_state(3)

πŸ’– gnutls_record_set_state(3) πŸ’–

okay bestie, welcome to the gnutls manual page for gnutls_record_set_state ✨ β€” yes it's a mouthful, no you're not gonna forget it, let's go 🌸


πŸŽ€ NAME πŸŽ€

gnutls_record_set_state β€” API function, and she's lowkey iconic for it πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/gnutls.h>

int gnutls_record_set_state(gnutls_session_t session, unsigned read,
       const unsigned char [8] seq_number);

there she is 🫢 look at her. three args, one return value, no drama.


🌸 ARGUMENTS 🌸

  • gnutls_session_t session β€” it's a gnutls_session_t type. that's the whole vibe, that's the whole description, we move πŸ’œ
  • unsigned read β€” if it's non-zero, you're talking about the read parameters. if it's zero, it's the write ones instead. pick your fighter 😌
  • const unsigned char [8] seq_number β€” a 64-bit sequence number, which is genuinely a lot of number fr fr

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function sets the sequence number in the current record state. that's it, that's the job πŸ‘‘

and the way this is useful?? it's when sending and receiving get offloaded from gnutls β€” like, gnutls isn't the one doing the talking anymore, somebody else is, and you need to sync up the numbers. that is, if gnutls_record_get_state() was used. yes, the get one. this is the set one. they're a matching set, they're a duo, they ate πŸ”₯


⭐ RETURNS ⭐

GNUTLS_E_SUCCESS on success, or an error code. classic. no notes πŸ’–

since 3.4.0 β€” an old queen, respect her πŸ™ˆ

πŸ’€ REPORTING BUGS πŸ’€

found a bug? not on my watch β€” report it to <bugs@gnutls.org> πŸ“§

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. (translation: share it, remix it, just keep the receipt πŸ§ΎπŸ’œ)


🌈 SEE ALSO 🌈

the full documentation for gnutls is maintained as a Texinfo manual πŸ“š if the /usr/share/doc/gnutls/ directory does NOT have the HTML form, then bestie, you go here:

https://www.gnutls.org/manual/


and that's the whole page, we're done, we're free πŸ¦‹ this was gnutls_record_set_state(3) from the gnutls 3.8.13 manual πŸ’… slay, go set some sequence numbers, i'm obsessed with you 🫢✨

πŸ“¦ where this page comes from