Sys::Sendfile - Zero-copy data transfer
Version 0.11
use Sys::Sendfile; sendfile $sink, $source, $count;
Sys::Sendfile provides access to your operating system's 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
This function sends up to $count bytes from $in to $out. If $count isn't given, it will send all remaining bytes in $in. $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.
$count
$in
$out
$!
Leon Timmermans, <leont at cpan.org> wrote the Linux FreeBSD and Solaris code.
<leont at cpan.org>
Kazuho Oku <kazuhooku@gmail.com> wrote the Mac OS X code.
<kazuhooku@gmail.com>
Not all operating systems support sendfile(). Currently Linux, FreeBSD, Solaris, Mac OS X (version 10.5 and up) and Windows are supported.
Please report any bugs or feature requests to bug-sys-sendfile at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sys-Sendfile. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-sys-sendfile at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Sys::Sendfile
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Sys-Sendfile
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Sys-Sendfile
CPAN Ratings
http://cpanratings.perl.org/d/Sys-Sendfile
Search CPAN
http://search.cpan.org/dist/Sys-Sendfile
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
Copyright 2009 Leon Timmermans, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Sys::Sendfile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sys::Sendfile
CPAN shell
perl -MCPAN -e shell install Sys::Sendfile
For more information on module installation, please visit the detailed CPAN module installation guide.