IO/sendfile2 version 0.02
=========================

This module is essentially a wrapper for Linux' sendfile syscall. Sendfile
copies from one file to another without user-space interaction.

The syntax is:

 use IO::sendfile2;
 $rc = IO::sendfile2::sendfile($out_fd, $in_fd, $offset, $count);

Typical usage:

 use IO::sendfile2 qw{sendfile};
 $filepos = 20;
 $count = 10;
 $sent = sendfile(fileno($some_handle), fileno(IN_FILE), $filepos, $count);
 # $count is 30 now (if everything was ok)

$sent contains the number of sent bytes or -1 if something goes wrong (with
the error in $!). $filepos is changed to the position after the last read
byte. See sendfile(2) for further information.

This will probably not work with files larger than 2GiB.

Note that since Linux 2.6 this only works with out_fd being a socket.


INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make install


DEPENDENCIES

This module requires Linux with a kernel > 2.2.


COPYRIGHT AND LICENCE

Copyright (C) 2005 Jakob Hirsch (sendfile@plonk.de)


