1gnutls_record_recv(3) gnutls gnutls_record_recv(3)
2
3
4
6 gnutls_record_recv - reads data from the TLS record protocol
7
9 #include <gnutls/gnutls.h>
10
11 ssize_t gnutls_record_recv(gnutls_session_t session, void * data,
12 size_t sizeofdata);
13
15 gnutls_session_t session
16 is a gnutls_session_t structure.
17
18 void * data the buffer that the data will be read into
19
20 size_t sizeofdata
21 the number of requested bytes
22
24 This function has the similar semantics with recv(). The only differ‐
25 ence is that it accepts a GnuTLS session, and uses different error
26 codes.
27
28 In the special case that a server requests a renegotiation, the client
29 may receive an error code of GNUTLS_E_REHANDSHAKE. This message may be
30 simply ignored, replied with an alert GNUTLS_A_NO_RENEGOTIATION, or
31 replied with a new handshake, depending on the client's will.
32
33 If EINTR is returned by the internal push function (the default is
34 recv()) then GNUTLS_E_INTERRUPTED will be returned. If GNUTLS_E_INTER‐
35 RUPTED or GNUTLS_E_AGAIN is returned, you must call this function again
36 to get the data. See also gnutls_record_get_direction().
37
38 A server may also receive GNUTLS_E_REHANDSHAKE when a client has initi‐
39 ated a handshake. In that case the server can only initiate a handshake
40 or terminate the connection.
41
43 the number of bytes received and zero on EOF. A negative error code is
44 returned in case of an error. The number of bytes received might be
45 less than sizeofdata.
46
48 Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page:
49 http://www.gnu.org/software/gnutls/ General help using GNU software:
50 http://www.gnu.org/gethelp/
51
53 Copyright © 2008 Free Software Foundation.
54 Copying and distribution of this file, with or without modification,
55 are permitted in any medium without royalty provided the copyright
56 notice and this notice are preserved.
57
59 The full documentation for gnutls is maintained as a Texinfo manual.
60 If the info and gnutls programs are properly installed at your site,
61 the command
62
63 info gnutls
64
65 should give you access to the complete manual.
66
67
68
69gnutls 2.8.6 gnutls_record_recv(3)