gnutls_record_recv_early_data(3)
β¨ gnutls_record_recv_early_data β¨
okay bestie, welcome to the gnutls manual, page gnutls_record_recv_early_data(3) π this one is lowkey iconic β it's literally the API function that lets a server grab data that showed up early, before the handshake even finished. main character energy fr fr πΈ
π NAME π
gnutls_record_recv_early_data β it's an API function, no cap π«Ά
π SYNOPSIS π
#include <gnutls/gnutls.h>
ssize_t gnutls_record_recv_early_data(gnutls_session_t session, void *
data, size_t data_size);
that's the whole vibe right there β¨
π ARGUMENTS π
gnutls_session_t sessionβ bestie this is literally agnutls_session_ttype. that's the tea βvoid * dataβ the buffer that the data is gonna get read into π§Ίsize_t data_sizeβ the number of requested bytes, aka how much room you're giving it π
π¦ DESCRIPTION π¦
so the way that this works: this function can be used by a server to retrieve data sent early in the handshake process when resuming a session π it's the whole point of implementing a zero-roundtrip (0-RTT) mode. it has the same semantics as gnutls_record_recv(), periodt π
and the flex? you can call this function either in a handshake hook, or after the handshake is complete. either one. we love options π
β RETURNS β
here's what you get back:
- the number of bytes received, and zero when early data reading is complete β
- a negative error code if something went wrong π
- if no early data is received during the handshake, this function returns
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEπ
heads up bestie: the number of bytes received might be less than the requested data_size. don't come for me, that's just how it is π
πΈ SINCE πΈ
3.6.5 β she's been around a minute, an OG π
π REPORTING BUGS π
found a bug? not the vibe, but okay, report it to <bugs@gnutls.org> π§
home page: https://www.gnutls.org π
π COPYRIGHT π
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 off, just keep the receipts π§Ύβ¨
π§ 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 ate that π
β¨ this was the gnutls manual, page gnutls_record_recv_early_data(3), and the footer tells us it's gnutls version 3.8.13 π«Ά go forth and 0-RTT responsibly π
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms