1gnutls_record_send(3)               gnutls               gnutls_record_send(3)
2
3
4

NAME

6       gnutls_record_send - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       ssize_t gnutls_record_send(gnutls_session_t session, const void * data,
12       size_t data_size);
13

ARGUMENTS

15       gnutls_session_t session
16                   is a gnutls_session_t type.
17
18       const void * data
19                   contains the data to send
20
21       size_t data_size
22                   is the length of the data
23

DESCRIPTION

25       This function has the similar semantics with send().  The only  differ‐
26       ence  is  that  it  accepts  a GnuTLS session, and uses different error
27       codes.  Note that if the send buffer is full, send()  will  block  this
28       function.  See the send() documentation for more information.
29
30       You  can  replace  the  default push function which is send(), by using
31       gnutls_transport_set_push_function().
32
33       If  the  EINTR  is  returned  by  the  internal  push   function   then
34       GNUTLS_E_INTERRUPTED  will  be  returned.  If  GNUTLS_E_INTERRUPTED  or
35       GNUTLS_E_AGAIN is returned, you must call this function again with  the
36       exact  same  parameters,  or provide a NULL pointer for  data and 0 for
37       data_size , in order to write the same data as before. If you  wish  to
38       discard   the   previous  data  instead  of  retrying,  you  must  call
39       gnutls_record_discard_queued() before calling this function  with  dif‐
40       ferent  parameters.  Note  that the latter works only on special trans‐
41       ports (e.g., UDP).  cf. gnutls_record_get_direction().
42
43       Note that in DTLS this function will return  the  GNUTLS_E_LARGE_PACKET
44       error  code if the send data exceed the data MTU value - as returned by
45       gnutls_dtls_get_data_mtu(). The  errno  value  EMSGSIZE  also  maps  to
46       GNUTLS_E_LARGE_PACKET.   Note  that  since  3.2.13 this function can be
47       called under cork in DTLS mode, and will refuse to send data  over  the
48       MTU size by returning GNUTLS_E_LARGE_PACKET.
49

RETURNS

51       The  number  of  bytes  sent,  or a negative error code.  The number of
52       bytes sent might be less than  data_size .  The maximum number of bytes
53       this function can send in a single call depends on the negotiated maxi‐
54       mum record size.
55

REPORTING BUGS

57       Report bugs to <bugs@gnutls.org>.
58       Home page: https://www.gnutls.org
59
60
62       Copyright © 2001- Free Software Foundation, Inc., and others.
63       Copying and distribution of this file, with  or  without  modification,
64       are  permitted in any medium without royalty provided the copyright no‐
65       tice and this notice are preserved.
66

SEE ALSO

68       The full documentation for gnutls is maintained as  a  Texinfo  manual.
69       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
70       visit
71
72       https://www.gnutls.org/manual/
73
74gnutls                               3.7.8               gnutls_record_send(3)
Impressum