NAME

File::Send - Sending files over a socket efficiently and cross-platform

VERSION

version 0.002

SYNOPSIS

DESCRIPTION

File::Send provides access to your operating system's sendfile facility, or if that is not available uses File::Map and syswrite to achieve a similarly efficient io function. 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.

FUNCTIONS

sendfile $out, $in, $count

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 it throws an exception describing the problem. This function is exported by default.

FUNCTIONS

AUTHOR

Leon Timmermans <leont@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 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.