|
Packit |
aea12f |
.\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
|
|
Packit Service |
991b93 |
.TH "gnutls_record_send" 3 "3.6.14" "gnutls" "gnutls"
|
|
Packit |
aea12f |
.SH NAME
|
|
Packit |
aea12f |
gnutls_record_send \- API function
|
|
Packit |
aea12f |
.SH SYNOPSIS
|
|
Packit |
aea12f |
.B #include <gnutls/gnutls.h>
|
|
Packit |
aea12f |
.sp
|
|
Packit |
aea12f |
.BI "ssize_t gnutls_record_send(gnutls_session_t " session ", const void * " data ", size_t " data_size ");"
|
|
Packit |
aea12f |
.SH ARGUMENTS
|
|
Packit |
aea12f |
.IP "gnutls_session_t session" 12
|
|
Packit |
aea12f |
is a \fBgnutls_session_t\fP type.
|
|
Packit |
aea12f |
.IP "const void * data" 12
|
|
Packit |
aea12f |
contains the data to send
|
|
Packit |
aea12f |
.IP "size_t data_size" 12
|
|
Packit |
aea12f |
is the length of the data
|
|
Packit |
aea12f |
.SH "DESCRIPTION"
|
|
Packit |
aea12f |
This function has the similar semantics with \fBsend()\fP. The only
|
|
Packit |
aea12f |
difference is that it accepts a GnuTLS session, and uses different
|
|
Packit |
aea12f |
error codes.
|
|
Packit |
aea12f |
Note that if the send buffer is full, \fBsend()\fP will block this
|
|
Packit Service |
991b93 |
function. See the \fBsend()\fP documentation for more information.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
You can replace the default push function which is \fBsend()\fP, by using
|
|
Packit |
aea12f |
\fBgnutls_transport_set_push_function()\fP.
|
|
Packit |
aea12f |
|
|
Packit Service |
991b93 |
If the EINTR is returned by the internal push function
|
|
Packit |
aea12f |
then \fBGNUTLS_E_INTERRUPTED\fP will be returned. If
|
|
Packit |
aea12f |
\fBGNUTLS_E_INTERRUPTED\fP or \fBGNUTLS_E_AGAIN\fP is returned, you must
|
|
Packit Service |
991b93 |
call this function again with the exact same parameters, or provide a
|
|
Packit Service |
991b93 |
\fBNULL\fP pointer for \fIdata\fP and 0 for \fIdata_size\fP , in order to write the
|
|
Packit Service |
991b93 |
same data as before. If you wish to discard the previous data instead
|
|
Packit Service |
991b93 |
of retrying, you must call \fBgnutls_record_discard_queued()\fP before
|
|
Packit Service |
991b93 |
calling this function with different parameters. Note that the latter
|
|
Packit Service |
991b93 |
works only on special transports (e.g., UDP).
|
|
Packit Service |
991b93 |
cf. \fBgnutls_record_get_direction()\fP.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Note that in DTLS this function will return the \fBGNUTLS_E_LARGE_PACKET\fP
|
|
Packit |
aea12f |
error code if the send data exceed the data MTU value \- as returned
|
|
Packit |
aea12f |
by \fBgnutls_dtls_get_data_mtu()\fP. The errno value EMSGSIZE
|
|
Packit Service |
991b93 |
also maps to \fBGNUTLS_E_LARGE_PACKET\fP.
|
|
Packit |
aea12f |
Note that since 3.2.13 this function can be called under cork in DTLS
|
|
Packit |
aea12f |
mode, and will refuse to send data over the MTU size by returning
|
|
Packit |
aea12f |
\fBGNUTLS_E_LARGE_PACKET\fP.
|
|
Packit |
aea12f |
.SH "RETURNS"
|
|
Packit |
aea12f |
The number of bytes sent, or a negative error code. The
|
|
Packit |
aea12f |
number of bytes sent might be less than \fIdata_size\fP . The maximum
|
|
Packit |
aea12f |
number of bytes this function can send in a single call depends
|
|
Packit |
aea12f |
on the negotiated maximum record size.
|
|
Packit |
aea12f |
.SH "REPORTING BUGS"
|
|
Packit |
aea12f |
Report bugs to <bugs@gnutls.org>.
|
|
Packit |
aea12f |
.br
|
|
Packit |
aea12f |
Home page: https://www.gnutls.org
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
.SH COPYRIGHT
|
|
Packit Service |
991b93 |
Copyright \(co 2001- Free Software Foundation, Inc., and others.
|
|
Packit |
aea12f |
.br
|
|
Packit |
aea12f |
Copying and distribution of this file, with or without modification,
|
|
Packit |
aea12f |
are permitted in any medium without royalty provided the copyright
|
|
Packit |
aea12f |
notice and this notice are preserved.
|
|
Packit |
aea12f |
.SH "SEE ALSO"
|
|
Packit |
aea12f |
The full documentation for
|
|
Packit |
aea12f |
.B gnutls
|
|
Packit |
aea12f |
is maintained as a Texinfo manual.
|
|
Packit |
aea12f |
If the /usr/share/doc/gnutls/
|
|
Packit |
aea12f |
directory does not contain the HTML form visit
|
|
Packit |
aea12f |
.B
|
|
Packit |
aea12f |
.IP https://www.gnutls.org/manual/
|
|
Packit |
aea12f |
.PP
|