From: Eric Hodel Date: 2006-03-24T10:52:24+09:00 Subject: [ANN] socket_sendfile = socket_sendfile Rubyforge Project: http://rubyforge.org/projects/rctools/ Documentation: http://dev.robotcoop.com/Libraries/socket_sendfile/ == About Socket#sendfile implements sendfile(2) for sending files without copying data to the process. See the sendfile(2) manual page for more details. Note that your system must support the sendfile(2) system call the same way FreeBSD does for Socket#sendfile to work. == Installing socket_sendfile First you need an OS that supports sendfile() the way FreeBSD does. Then install the gem: $ sudo gem install socket_sendfile == Using socket_sendfile require 'rubygems' require 'socket' require 'socket_sendfile' socket = TCPSocket.open host, port File.open 'myfile' do |fp| socket.sendfile fp end -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com