return (len);
#elif defined(SENDFILE_IS_LINUX)
- /* TODO(niels): implement splice */
res = sendfile(dest_fd, source_fd, &offset, chain->off);
if (res == -1 && EVUTIL_ERR_RW_RETRIABLE(errno)) {
/* if this is EAGAIN or EINTR return 0; otherwise, -1 */
/* Define to 1 if you have the `strsignal' function. */
#cmakedefine EVENT__HAVE_STRSIGNAL 1
-/* Define to 1 if you have the `splice' function. */
-#cmakedefine EVENT__HAVE_SPLICE 1
-
/* Define to 1 if you have the <stdarg.h> header file. */
#cmakedefine EVENT__HAVE_STDARG_H 1
/**
An evbuffer_file_segment holds a reference to a range of a file --
possibly the whole file! -- for use in writing from an evbuffer to a
- socket. It could be implemented with mmap, sendfile, splice, or (if all
- else fails) by just pulling all the data into RAM. A single
- evbuffer_file_segment can be added more than once, and to more than one
- evbuffer.
+ socket. It could be implemented with mmap or sendfile, or (if all else
+ fails) by just pulling all the data into RAM. A single evbuffer_file_segment
+ can be added more than once, and to more than one evbuffer.
*/
struct evbuffer_file_segment;
#define EVBUF_FS_DISABLE_MMAP 0x02
/**
Flag for creating evbuffer_file_segment: Disable direct fd-to-fd
- implementations (including sendfile and splice).
+ implementations (sendfile).
You might want to use this option if data needs to be taken from the
evbuffer by any means other than writing it to the network: the sendfile
file and sending it out via an evbuffer.
This function avoids unnecessary data copies between userland and
- kernel. Where available, it uses sendfile or splice.
+ kernel. Where available, it uses sendfile.
The file descriptor must not be closed so long as any evbuffer is using
this segment.
view_from_offset = 1;
}
if (strstr(impl, "sendfile")) {
- /* If sendfile is set, we try to use a sendfile/splice style
- * backend. */
+ /* If sendfile is set, we try to use a sendfile style backend. */
flags = EVBUF_FS_DISABLE_MMAP;
want_cansendfile = 1;
want_ismapping = 0;