1gnutls_record_send(3) gnutls gnutls_record_send(3)
2
3
4
6 gnutls_record_send - API function
7
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
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
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; alternatively you could provide a NULL pointer
37 for data, and 0 for size. cf. gnutls_record_get_direction().
38
39 Note that in DTLS this function will return the GNUTLS_E_LARGE_PACKET
40 error code if the send data exceed the data MTU value - as returned by
41 gnutls_dtls_get_data_mtu(). The errno value EMSGSIZE also maps to
42 GNUTLS_E_LARGE_PACKET. Note that since 3.2.13 this function can be
43 called under cork in DTLS mode, and will refuse to send data over the
44 MTU size by returning GNUTLS_E_LARGE_PACKET.
45
47 The number of bytes sent, or a negative error code. The number of
48 bytes sent might be less than data_size . The maximum number of bytes
49 this function can send in a single call depends on the negotiated maxi‐
50 mum record size.
51
53 Report bugs to <bugs@gnutls.org>.
54 Home page: https://www.gnutls.org
55
56
58 Copyright © 2001-2019 Free Software Foundation, Inc., and others.
59 Copying and distribution of this file, with or without modification,
60 are permitted in any medium without royalty provided the copyright
61 notice and this notice are preserved.
62
64 The full documentation for gnutls is maintained as a Texinfo manual.
65 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
66 visit
67
68 https://www.gnutls.org/manual/
69
70gnutls 3.6.8 gnutls_record_send(3)