class Fluent::Plugin::HttpInput::KeepaliveManager
Public Class Methods
new(timeout)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/in_http.rb, line 149 def initialize(timeout) super(1, true) @cons = {} @timeout = timeout.to_i end
Public Instance Methods
add(sock)
click to toggle source
# File lib/fluent/plugin/in_http.rb, line 155 def add(sock) @cons[sock] = sock end
delete(sock)
click to toggle source
# File lib/fluent/plugin/in_http.rb, line 159 def delete(sock) @cons.delete(sock) end
on_timer()
click to toggle source
# File lib/fluent/plugin/in_http.rb, line 163 def on_timer @cons.each_pair {|sock,val| if sock.step_idle > @timeout sock.close end } end