1io_sendfile(3)             Library Functions Manual             io_sendfile(3)
2
3
4

NAME

6       io_sendfile - send data from a file to a socket
7

SYNTAX

9       #include <io.h>
10
11       int64 io_sendfile(int64 sock,int64 fd,uint64 off,uint64 n);
12

DESCRIPTION

14       io_sendfile sends data from a file to a socket.  This function tries to
15       do this in a way that allows high quality operating systems to do zero-
16       copy  TCP  (serving  the data without copying the file contents to user
17       space or inside kernel space).  This function will use special  operatā€
18       ing  system "sendfile" primitives where available and use memory mapped
19       I/O otherwise.  It should  always  be  faster  than  using  read()  and
20       write() to copy the data yourself.
21
22       io_sendfile  will  return  the  number  of  bytes  sent.   If  an error
23       occurred, it will return -1 for EAGAIN, or -3 otherwise.
24

SEE ALSO

26       io_wait(3), io_waituntil(3)
27
28
29
30                                                                io_sendfile(3)
Impressum