Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_record_recv.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_record_recv" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_record_recv \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "ssize_t gnutls_record_recv(gnutls_session_t " session ", void * " data ", size_t " sizeofdata ");"
9 .SH ARGUMENTS
10 .IP "gnutls_session_t session" 12
11 is a \fBgnutls_session_t\fP structure.
12 .IP "void * data" 12
13 the buffer that the data will be read into
14 .IP "size_t sizeofdata" 12
15 the number of requested bytes
16 .SH "DESCRIPTION"
17 This function has the similar semantics with \fBrecv()\fP.  The only
18 difference is that it accepts a GnuTLS session, and uses different
19 error codes.
20
21 In the special case that a server requests a renegotiation, the
22 client may receive an error code of \fBGNUTLS_E_REHANDSHAKE\fP.  This
23 message may be simply ignored, replied with an alert
24 \fBGNUTLS_A_NO_RENEGOTIATION\fP, or replied with a new handshake,
25 depending on the client's will.
26
27 If \fBEINTR\fP is returned by the internal push function (the default
28 is \fBrecv()\fP) then \fBGNUTLS_E_INTERRUPTED\fP will be returned.  If
29 \fBGNUTLS_E_INTERRUPTED\fP or \fBGNUTLS_E_AGAIN\fP is returned, you must
30 call this function again to get the data.  See also
31 \fBgnutls_record_get_direction()\fP.
32
33 A server may also receive \fBGNUTLS_E_REHANDSHAKE\fP when a client has
34 initiated a handshake. In that case the server can only initiate a
35 handshake or terminate the connection.
36 .SH "RETURNS"
37 the number of bytes received and zero on EOF.  A negative
38 error code is returned in case of an error.  The number of bytes
39 received might be less than \fIsizeofdata\fP.
40 .SH "REPORTING BUGS"
41 Report bugs to <bug-gnutls@gnu.org>.
42 GnuTLS home page: http://www.gnu.org/software/gnutls/
43 General help using GNU software: http://www.gnu.org/gethelp/
44 .SH COPYRIGHT
45 Copyright \(co 2008 Free Software Foundation.
46 .br
47 Copying and distribution of this file, with or without modification,
48 are permitted in any medium without royalty provided the copyright
49 notice and this notice are preserved.
50 .SH "SEE ALSO"
51 The full documentation for
52 .B gnutls
53 is maintained as a Texinfo manual.  If the
54 .B info
55 and
56 .B gnutls
57 programs are properly installed at your site, the command
58 .IP
59 .B info gnutls
60 .PP
61 should give you access to the complete manual.