gnutls_record_send_early_data(3)

πŸ’– gnutls_record_send_early_data β€” API function πŸ’–

okay bestie, welcome to the gnutls manual, section 3 πŸŽ€ this one's all about gnutls_record_send_early_data(3) and it's lowkey iconic. let's get into it ✨


🌸 NAME 🌸

gnutls_record_send_early_data β€” API function πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/gnutls.h>

ssize_t gnutls_record_send_early_data(gnutls_session_t session, const
void * data, size_t data_size);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_session_t session β€” bestie this is literally a gnutls_session_t type, that's the whole vibe 🫢
  • const void * data β€” this holds the data you wanna send, no cap πŸ“¦
  • size_t data_size β€” and this is the length of that data, periodt πŸ“

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea πŸ“: a client can use this function to send data early in the handshake process, specifically when it's resuming a session. It's giving zero-roundtrip (0-RTT) mode, and honestly? obsessed. 😌✨

It has the exact same semantics as gnutls_record_send() β€” same energy, different timing πŸ’…

⚠️ Heads up bestie: there may be a limit to how much data you can send as early data. Use gnutls_record_get_max_early_data_size() to check that limit before you go feral. And if you exceed the limit? This function returns GNUTLS_E_RECORD_LIMIT_REACHED πŸ˜­πŸ’€

πŸ”₯ RETURNS πŸ”₯

It hands you back the number of bytes sent, or a negative error code if things went sideways πŸ™ˆ

Real talk though: the number of bytes sent might be less than data_size. And the max number of bytes this function can send in a single call depends on the negotiated maximum record size. iykyk 🧚


⭐ SINCE ⭐

3.6.5 β€” a classic, been around forever, main character energy πŸ‘‘


πŸŽ€ REPORTING BUGS πŸŽ€

Found a bug? Don't be shy, 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. 🫢 (yes bestie, that means you can share it, slay)


πŸ’– 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, go visit:

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

and that's the whole page, bestie! πŸ’…βœ¨ this lil legend comes to you from gnutls version 3.8.13, and yeah, it's the gnutls_record_send_early_data(3) page, iconic as ever. go forth and send that early data responsibly πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from