lib/ebb.rb
def on_writable
      @being_written = nil
      return unless res = responses.first
      if res.finished?
        responses.shift
        if res.last 
          FFI::connection_schedule_close(self) 
          return
        end
      end 
      write
    end
# called after FFI::connection_write if complete
called after FFI::connection_write if complete
called after FFI :: connection_write if complete
def on_writable
      @being_written = nil
      return unless res = responses.first
      if res.finished?
        responses.shift
        if res.last 
          FFI::connection_schedule_close(self) 
          return
        end
      end 
      write
    end
def on_writable @being_written = nil return unless res = responses . first if res . finished? responses . shift if res . last FFI :: connection_schedule_close ( self ) return end end write end
called after FFI::connection_write if complete
called after FFI :: connection_write if complete