eventmachine/eventmachine — pull request #317 by funny-falcon (2012-04-19 17:15:20+00:00)
Title: Add possibility to watch on outbound data

EM::Connection produced by EM.connect has no ability to react on slow clients, `send_data` pushes data infinitely.

This pull request two ability:
1. to know outbound data size . It is already exists on C level, but were not exposed to Ruby level
````
c = EM.connect('xx','xx', EM::Connection)
c.send_data('a'*1000000)
c.outbound_data_size
````
2. to react on outbound data size reduction
````
module Handler
def sent_data
puts "some data sent"
end
end
c = EM.connect('xx','xx', EM::Connection){|c| c.notify_sent_data = true}
c.send_data('a'*1000000)
````