1 h1. Ruby sendfile(2) Interface
3 This module allows Ruby programs to access their OS's native <code>sendfile(2)</code> system call from any IO object. Your kernel must export a recognized signature for the <code>sendfile(2)</code> system call to use this module. Currently, that includes Linux, Solaris and FreeBSD.
7 Download and install the latest package from the rubyforge.org RubyGems repository.
10 $ gem install sendfile
13 If the tests all pass, you're ready to start using sendfile!
17 Here's a small example of a use of <code>IO#sendfile</code>.
22 s = TCPSocket.new 'yourdomain.com', 5000
23 File.open 'somefile.txt' { |f| s.sendfile f }
26 p. See the test scripts for more examples on how to use this module.