Parent

Class/Module Index [+]

Quicksearch

Fluent::SyslogInput::UdpHandler

Public Class Methods

new(io, callback) click to toggle source
# File lib/fluent/plugin/in_syslog.rb, line 185
def initialize(io, callback)
  super(io)
  @io = io
  @callback = callback
end

Public Instance Methods

on_readable() click to toggle source
# File lib/fluent/plugin/in_syslog.rb, line 191
def on_readable
  msg, addr = @io.recvfrom_nonblock(2048)
  #host = addr[3]
  #port = addr[1]
  #@callback.call(host, port, msg)
  @callback.call(msg)
rescue
  # TODO log?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.