initial commit + release
[kgio.git] / README
blob2347c79cbb129a86fdbc7692e89c3a558bfaf5da
1 = kgio - kinder, gentler I/O for Ruby
3 kgio provides non-blocking I/O methods for Ruby without raising
4 exceptions on EAGAIN and EINPROGRESS.  It is intended for use with the
5 Unicorn and Rainbows! Rack servers, but may be used by other
6 applications.
8 == Features
10 * Avoids exceptions on common EAGAIN/EINPROGRESS errors, returning
11   Kgio::WaitReadable or Kgio::WaitWritable instead.
12   These exceptions got more expensive to hit under Ruby 1.9.2
13   (but should be fixed in Ruby 1.9.3 to 1.9.1 performance levels)
15 * Returns the unwritten portion of the string on partial writes,
16   making it ideal for buffering unwritten portions.
18 * May be assigned Kgio.wait_writable= and Kgio.wait_readable=
19   methods to allow socket/pipe objects to make custom callbacks
20   (such as adding the file descriptor to a poll set and yielding
21   the current Fiber).
23 * Uses
24   {accept4}[http://kernel.org/doc/man-pages/online/pages/man2/accept4.2.html]
25   on new GNU/Linux systems to avoid unnecessary fcntl() calls
27 * uses MSG_DONTWAIT where available to further avoid unnecessary fcntl() calls
29 == Install
31 The library consists of a C extension so you'll need a C compiler
32 and Ruby development libraries/headers.
34 You may download the tarball from the Mongrel project page on Rubyforge
35 and run setup.rb after unpacking it:
37 http://rubyforge.org/frs/?group_id=8977
39 You may also install it via RubyGems on Gemcutter:
41   gem install kgio
43 You can get the latest source via git from the following locations
44 (these versions may not be stable):
46   git://git.bogomips.org/kgio.git
47   git://repo.or.cz/kgio.git (mirror)
49 You may browse the code from the web and download the latest snapshot
50 tarballs here:
52 * http://git.bogomips.org/cgit/kgio.git (cgit)
53 * http://repo.or.cz/w/kgio.git (gitweb)
55 See the HACKING guide on how to contribute and build prerelease gems
56 from git.
58 == Contact
60 All feedback (bug reports, user/development dicussion, patches, pull
61 requests) go to the mailing list/newsgroup.  See the ISSUES document for
62 information on the
63 {Unicorn mailing list}[mailto:mongrel-unicorn@rubyforge.org].
65 For the latest on kgio releases, you may check our NEWS page (and
66 subscribe to our Atom feed).