Module: NetflowCollector::Collector

Defined in:
lib/netflow/collector.rb

Instance Method Summary collapse

Instance Method Details

#post_initObject



4
5
6
# File 'lib/netflow/collector.rb', line 4

def post_init
  puts "Server listening."
end

#receive_data(data) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/netflow/collector.rb', line 7

def receive_data(data)
  puts "Datagram recieved."
  if data != nil
    begin
      Netflow.parse_packet(data)
    rescue
      puts "Error parsing packet"
    end
  end
end