tee_input: allow using Revactor::TCP::Socket objects
commit69650f8f09fca2c7df3230e2bf054961a5292e52
authorEric Wong <normalperson@yhbt.net>
Tue, 18 Aug 2009 18:59:16 +0000 (18 11:59 -0700)
committerEric Wong <normalperson@yhbt.net>
Tue, 18 Aug 2009 18:59:16 +0000 (18 11:59 -0700)
tree2e96ef4fd28b7ebf02381b264c5fc3a927556dd2
parent4e81d6f2e2a6a6b3de15bbd0e08992dd4630fa4b
tee_input: allow using Revactor::TCP::Socket objects

The Revactor::TCP::Socket#read method without any arguments is
more or less equivalent to TCPSocket#readpartial without an
explicit buffer.  Since we rely on the buffer being
modified/replaced, monkey patch that object it to replace the
buffer with our own since we rely on modifying the existing
buffer passed to us.
lib/unicorn/tee_input.rb