about summary refs log tree commit homepage
DateCommit message (Collapse)
2010-09-27add compatibility for ancient Rubies
This is tested on Ruby 1.8.6-p114, but may work for 1.8.5, too. Ugh, people ought to upgrade.
2010-09-28kgio 1.0.0 - initial release v1.0.0
Documentation and release infrastructure updates and such...
2010-09-28doc: TODO update
2010-09-28read/write: account for buffer changes during wait
It's possible for applications to modify the buffer during reads and writes, so make a best effort to account for those.
2010-09-28tests: fix broken monster trywrite test
Oops, use random data so it's easier to detect this.
2010-09-27test_tcp*read_write: use blocking kgio_accept in setup
Some OSes (FreeBSD 7.0) do not seem to setup connections as quickly.
2010-09-27set blocking flag before blocking IO#read
Some older Rubies may not behave correctly otherwise
2010-09-27tess: ensure buffer is cleared on failures
No need to leak data.
2010-09-27more documentation
Somebody's gotta do it...
2010-09-27avoid initiating syscalls before rb_io_wait_*
Some Ruby implementations (Rubinius) may call lseek and clobber the intended errno when looking up the open file, causing rb_io_wait_* functions to fail.
2010-09-27add kgio_tryaccept, kgio_accept _really_ blocks
We'll stick with the "try" prefix if we're going to be non-blocking. kgio_accept will favor a blocking accept() call where it's possible to release the GVL, allowing it to avoid thundering herd problems. Otherwise it'll use thread-safe blocking under Ruby 1.8.
2010-09-27use SOCK_NONBLOCK for socket(2) if possible
This saves us a relatively expensive fcntl() system call.
2010-09-27connect: no do not leak descriptors on failure
We cannot raise exceptions and expect GC to clean up after us until we've created an actual IO object.
2010-09-27"start" singleton methods for non-blocking connect
These initiate (but do not wait for) non-blocking connects.
2010-09-26introduce kgio_try* methods
Avoid altering behavior based on globals that Kgio.wait_{read,writ}able stored in, since that's too confusing. The non-try variants are closer to the normal IO read/write methods, except they can be more easily plugged into alternate reactors and event frameworks.
2010-09-25kgio_read returns nil on EOF
Just like IO#read
2010-09-25split out reusable bits into separate headers
No point in cluttering up the meat of our code.
2010-09-25only use MSG_DONTWAIT under Linux
MSG_DONTWAIT is less consistently implemented/supported on other platforms on stream sockets, so fallback to fcntl() + read()/write() for stream sockets. This also fixes our previously broken support of non-MSG_DONTWAIT systems.
2010-09-25write/send may fail with ECONNRESET
Tested on FreeBSD 7.0
2010-09-25fix missing netinet/in.h include
This is needed for FreeBSD 7.0, at least.
2010-09-25beef up the test suite
We need to test server <-> client interaction more thoroughly since some systems don't implement everything right.
2010-09-25initial commit + release
everything shou^Wmight be working...