Debian Codegraph @

doc/functions/gnutls_record_recv_packet

raw
1
2
3
4
5 @deftypefun {ssize_t} {gnutls_record_recv_packet} (gnutls_session_t @var{session}, gnutls_packet_t * @var{packet})
6 @var{session}: is a @code{gnutls_session_t} type.
7
8 @var{packet}: the structure that will hold the packet data
9
10 This is a lower-level function than @code{gnutls_record_recv()} and allows
11 to directly receive the whole decrypted packet. That avoids a
12 memory copy, and is intended to be used by applications seeking high
13 performance.
14
15 The received packet is accessed using @code{gnutls_packet_get()} and
16 must be deinitialized using @code{gnutls_packet_deinit()} . The returned
17 packet will be @code{NULL} if the return value is zero (EOF).
18
19 @strong{Returns:} The number of bytes received and zero on EOF (for stream
20 connections). A negative error code is returned in case of an error.
21
22 @strong{Since:} 3.3.5
23 @end deftypefun