Sha256: d1f2cf0b0ec35a3ed386c81003745ad7b4cecf51fa9570cc510fda7da35fcc7f

Contents?: true

Size: 416 Bytes

Versions: 4

Compression:

Stored size: 416 Bytes

Contents

module NFAgent
  class Event < EventMachine::Connection
    def initialize(chunk_handler, poller)
      @handler = chunk_handler
      @poller = poller
    end

    def post_init
      Log.info "Client Connected"
    end

    def receive_data(data)
      if data && data.length > 2
        @handler.append(data)
      end
      send_data('OK')
    end

    def unbind
      Log.info "Disconnected"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nfagent-0.9.9 lib/nfagent/event.rb
nfagent-0.9.8 lib/nfagent/event.rb
nfagent-0.9.6 lib/nfagent/event.rb
nfagent-0.9.5 lib/nfagent/event.rb