about summary refs log tree commit homepage
DateCommit message (Collapse)
2011-02-09kgio 2.3.0 - MSG_PEEK and poll(2) support v2.3.0
recv() with MSG_PEEK for sockets is added with the try* interface. SocketMethods#kgio_trypeek and SocketMethods#kgio_peek or Kgio.trypeek for non-Kgio-enabled sockets. For Ruby 1.9 only: poll(2) is exposed via the Kgio.poll singleton method and should provide an alternative for IO.select users. Both of these new features should work well on modern Unix-like operating systems.
2011-02-08move poll support checks to kgio.h
We may use poll elsewhere...
2011-02-08pkg.mk: update to the latest
* Fixes Ruby 1.9.3dev deprecation warnings * Fixes some documentation dependency issues * Allows RUBY_TEST_OPTS to be passed to unit tests
2011-02-08doc: fully RDoc all methods and classes
Whee!
2011-02-08doc: fix accept -> tryaccept copy+paste error
Oops
2011-02-08README: fix download link/ref
2011-02-08preliminary poll(2) support
It's a nice alternative to IO.select for higher-numbered file descriptors, especially sparse ones. Our interface also generates less garbage than IO.select does.
2011-02-06add support for recv() with MSG_PEEK
Kgio.trypeek, kgio_trypeek and kgio_peek methods are added for using with sockets.
2011-02-03kgio 2.2.0 - kinder, gentler I/O for the Internets v2.2.0
* sockets accept()ed by a TCP_NOPUSH/TCP_CORK listener automatically flush on kgio_*read calls if there is pending data. "Kgio.autopush = false" disables this globally, and Kgio::Socket also get "kgio_autopush=" to enable/disable on a per-object individual basis. * ECONNRESET exceptions get empty backtraces for kgio_*read. There's nothing a programmer can do about these, so there's no point in going through the expensive backtrace generation process. * Kgio.try* singleton methods added for working with non-Kgio enhanced objects. No more needing to use Object#extend and blowing away your method cache to make existing I/O objects kinder and gentler. * IPv6 support should be complete, systems without a native getaddrinfo(3) are now unsupported (and will remain so unless somebody complains). There should be no other backwards-incompatible changes other than requiring getaddrinfo(3) and friends for IPv6 support.
2011-02-03add SocketMethods#kgio_addr!
This refreshes (or sets) the @kgio_addr ivar for sockets that didn't go through kgio_accept or kgio_tryaccept.
2011-02-02fix typos in ipv6 test case
Oops, RTFE :P
2011-02-02add proper IPv6 support
No extra #ifdefs, we just won't support old systems without getaddrinfo() and friends anymore. I doubt anybody still has them...
2011-02-01avoid re-interning if GCC is not used (or under 1.8)
Needless calls to rb_intern are wasteful in even semi-frequently used code.
2011-02-01kgio_*read: empty backtrace for ECONNRESET
There's nothing a programmer can do about ECONNRESET so just make the exception cheaper to raise so it can still be logged.
2011-01-31add singleton methods for non-Kgio objects
This allows people to more easily use Kgio in existing apps.
2011-01-31autopush: enable accessors for client sockets
Might as well allow clients to efficiently handle TCP_CORK/TCP_NOPUSH, too.
2011-01-31autopush: enable this by default
TCP_CORK (and presuably TCP_NOPUSH) aren't remotely useful in Rainbows! without this and there's almost no overhead for MRI, either.
2011-01-31autopush: optimize away ivar usage under MRI
We know that all versions of MRI have a small RFile structure that is allocated in the same object slots as other Ruby types and also zeroed on allocation. This optimization enables us to fall back to using ivars in case MRI changes or if we're used on other Rubies.
2011-01-31autopush: enable for TCP_NOPUSH under FreeBSD
Hopefully it works for people who use TCP_NOPUSH...
2011-01-31autopush: simplify implementation and just use ivars
Duh...
2011-01-31rename nopush_smart to autopush
This is probably a better name for it, libautocork is a nice name even though we won't use it directly.
2011-01-27preliminary implementation of "smart_nopush"
It only supports TCP_CORK under Linux right now. We use a very basic strategy to use TCP_CORK semantics optimally in most TCP servers: On corked sockets, we will uncork on recv() if there was a previous send(). Otherwise we do not fiddle with TCP_CORK at all. Under Linux, we can rely on TCP_CORK being inherited in an accept()-ed client socket so we can avoid syscalls for each accept()-ed client if we already know the accept() socket corks. This module does NOTHING for client TCP sockets, we only deal with accept()-ed sockets right now.
2011-01-27revamp packaging makefile, update URLs
More common code that's still GNU make is better for my sanity. Also, bogomips.org went on a URL diet recently.
2011-01-18add tests for empty writes, too
There could be some platforms that dislike it...
2011-01-13Makefile: remove non-existent target reference
Oops
2010-12-25kgio 2.1.1 - one small Rubinius fix v2.1.1
We now avoid errno side-effects in kgio_wait_*able methods. This affects Rubinius, but may affect other Ruby platforms (particularly those that use stdio) as well.
2010-12-25avoid errno side-effects in kgio_wait_*able
Retrieving the file descriptor may have side-effects on certain Ruby implementations (e.g. Rubinius), so ensure our errno is preserved before calling rb_io_wait_*able().
2010-12-26gemspec: point folks to the public mailing list
It's more useful that way.
2010-12-26kgio 2.1.0 - accept improvements and fixes v2.1.0
kgio_accept and kgio_tryaccept now take an optional argument to override the default Kgio::Socket class that is returned. These methods also fall back to using regular accept() if kgio was built on a system with accept4() and later run on a system without accept4().
2010-12-26quiet down some harmless compiler warnings
Less noise means we'll notice real bugs sooner.
2010-12-25accept4: fall back to regular accept() on ENOSYS
kgio may occasionally be built on a system with accept4() and then deployed on one without it. Handle this case gracefully since it unfortunately happens on production systems.
2010-12-25accept methods may take an optional argument
This is preferred as we no longer have to rely on a global constant.
2010-12-25Rakefile: fix RAA license
Oops, we were never Ruby licensed.
2010-12-25doc: use wrongdoc for documentation
wrongdoc factors out a bunch of common code from this project into its own and removes JavaScript from RDoc to boot.
2010-12-22fix errors in RDoc
Noticed-by: IƱaki Baz Castillo
2010-11-18kgio 2.0.0 - major internal API changes v2.0.0
(no code changes from 2.0.0pre1) This release should make Kgio easier and more consistent to use across a variety of libraries/applications. The global Kgio.wait_*able(=) accessor methods are gone in favor of having default kgio_wait_readable and kgio_wait_writable methods added to all Kgio-using classes. Sub-classes may (and are encouraged to) redefine these if needed. Eric Wong (7): expand Kgio::*#kgio_read! documentation prefer symbolic names for waiting read/writability EOFError message matches Ruby's README: Gemcutter => RubyGems.org update documentation with mailing list info add default kgio_wait_*able methods switch entirely to kgio_wait_*able methods
2010-11-18Rakefile: list prerelease tags as well
Since we do prerelease nowadays before real ones.
2010-11-18move website to bogomips.org
This project is useful enough for others and to stand alone without needing to be associated with Unicorn.
2010-11-18kgio 2.0.0pre1 - major internal API changes v2.0.0pre1
This release should make Kgio easier and more consistent to use across a variety of libraries/applications. The global Kgio.wait_*able(=) accessor methods are gone in favor of having default kgio_wait_readable and kgio_wait_writable methods added to all Kgio-using classes. Sub-classes may (and are encouraged to) redefine these if needed. Eric Wong (7): expand Kgio::*#kgio_read! documentation prefer symbolic names for waiting read/writability EOFError message matches Ruby's README: Gemcutter => RubyGems.org update documentation with mailing list info add default kgio_wait_*able methods switch entirely to kgio_wait_*able methods
2010-11-18switch entirely to kgio_wait_*able methods
This removes the global Kgio.wait_*able accesors and requires each class to define (or fall back to) the Kgio::DefaultWaiters methods.
2010-11-18add default kgio_wait_*able methods
It makes it easier for people to use certain overrides without killing other methods. This is the first step in fixing problems people were having with dalli 0.11.1+ while running Unicorn.
2010-11-15update documentation with mailing list info
We're a real project, apparently, so it can have its own mailing list.
2010-11-15README: Gemcutter => RubyGems.org
That's the new name for it and it's official
2010-11-12EOFError message matches Ruby's
This makes messages appear less different than Ruby when using kgio_read! Requested-by: Mike Perham
2010-11-05prefer symbolic names for waiting read/writability
There's no point in using constants that point to symbols instead of just the symbols themselves.
2010-10-28expand Kgio::*#kgio_read! documentation
If the author can forget why it was written, so can the rest of the world.
2010-10-08kgio 1.3.1 - fix zero-length reads v1.3.1
kgio_read and kgio_tryread will now return an empty string when a length of zero is specified instead of nil (which would signal an EOF). This emulates the behavior of IO#read, IO#readpartial, IO#sysread, IO#read_nonblock in core Ruby for consistency.
2010-10-08return empty string on length=0
This matches behavior of all the core Ruby methods.
2010-10-07kgio 1.3.0 - bug and usability fixes v1.3.0
* make Kgio::WaitWritable and Kgio::WaitReadable symbols * trywrite: fix stupid off-by-one error causing corrupt writes on retries
2010-10-07tests: don't trust what I think I know about Ruby
case/when and === didn't actually work as I expected them to.