Class: VHSKit::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/vhskit/handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(sock, conf) ⇒ Handler

Returns a new instance of Handler.



16
17
18
19
# File 'lib/vhskit/handler.rb', line 16

def initialize(sock, conf)
  @sock = sock
  @conf = conf.fns
end

Instance Method Details

#runObject



21
22
23
24
25
26
27
28
# File 'lib/vhskit/handler.rb', line 21

def run
  start
  @sock.close rescue false
rescue Exception => e
  STDERR.puts "error in VHSKit::Handler: #{e}"
  STDERR.puts e.backtrace
  @sock.close rescue false
end