Manual Reference Pages - SYS::SENDFILE (3)
Sys::Sendfile - Zero-copy data transfer
sendfile $sink, $source, $count;
Sys::Sendfile provides access to your operating systems sendfile facility. It allows you to efficiently transfer data from one filehandle to another. Typically the source is a file on disk and the sink is a socket, and some operating systems may not even support other usage.
sendfile CW$out, CW$in, CW$count, CW$offset
This function sends up to $count <B>bytesB> starting from $offset from $in to $out. If $count isnt given, it will try send all remaining bytes in $in, but on some operating systems sending only part of the bytes is a possible result. If $offset isnt given, the function will get current offset of $in (by calling lseek) and pass this information to underlying sendfile syscall. $in and $out can be a bareword, constant, scalar expression, typeglob, or a reference to a typeglob. It returns the number of bytes actually sent. On error, $! is set appropriately and it returns undef. This function is exported by default.
BUGS AND LIMITATIONS
Not all operating systems support sendfile(). Currently Linux, FreeBSD, Solaris, Mac OS X (version 10.5 and up) and Windows are supported.
sendfile(2) - Your manpage on sendfile
IO::Sendfile - A sendfile implementation for Linux
Sys::Syscall - Another sendfile implementation for Linux
Sys::Sendfile::FreeBSD - A module implementing the FreeBSD variant of sendfile
Leon Timmermans <email@example.com>
Kazuho Oku <firstname.lastname@example.org> wrote the Mac OS X code.
Yasuhiro Matsumoto <email@example.com> wrote the Win32 code.
COPYRIGHT AND LICENSE
This software is copyright (c) 2008 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
|perl v5.20.3 ||SYS::SENDFILE (3) ||2016-03-17 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.