1gnutls_record_send_file(3)          gnutls          gnutls_record_send_file(3)
2
3
4

NAME

6       gnutls_record_send_file - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       ssize_t gnutls_record_send_file(gnutls_session_t session, int fd, off_t
12       * offset, size_t count);
13

ARGUMENTS

15       gnutls_session_t session
16                   is a gnutls_session_t type.
17
18       int fd      file descriptor from which to read data.
19
20       off_t * offset
21                   Is relative to file offset, denotes the  starting  location
22                   for  reading.  after function returns, it point to position
23                   following last read byte.
24
25       size_t count
26                   is the length of the data in bytes to be read from file and
27                   send.
28

DESCRIPTION

30       This function sends data from  fd . If KTLS (kernel TLS) is enabled, it
31       will use the sendfile() system call to avoid overhead of  copying  data
32       between  user  space  and  the kernel. Otherwise, this functionality is
33       merely emulated by calling read() and gnutls_record_send(). If this im‐
34       plementation  is  suboptimal,  check  whether  KTLS  is  enabled  using
35       gnutls_transport_is_ktls_enabled().
36
37       If  offset is NULL then file offset is incremented by number  of  bytes
38       send, otherwise file offset remains unchanged.
39

RETURNS

41       The number of bytes sent, or a negative error code.
42

REPORTING BUGS

44       Report bugs to <bugs@gnutls.org>.
45       Home page: https://www.gnutls.org
46
47
49       Copyright © 2001-2023 Free Software Foundation, Inc., and others.
50       Copying  and  distribution  of this file, with or without modification,
51       are permitted in any medium without royalty provided the copyright  no‐
52       tice and this notice are preserved.
53

SEE ALSO

55       The  full  documentation  for gnutls is maintained as a Texinfo manual.
56       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
57       visit
58
59       https://www.gnutls.org/manual/
60
61gnutls                               3.8.2          gnutls_record_send_file(3)
Impressum