Class: Iodine::Base::Listener
Overview
the server listener Protocol.
Instance Attribute Summary
Attributes inherited from Protocol
Instance Method Summary collapse
Methods inherited from Protocol
#close, #closed?, each, #id, #initialize, #on_close, #on_message, #on_shutdown, #ping, #read, #set_timeout, #ssl?, #timeout?, #write
Constructor Details
This class inherits a constructor from Iodine::Protocol
Instance Method Details
#call ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/iodine/io.rb', line 80 def call begin n_io = nil loop do n_io = @io.accept_nonblock # @protocol.accept(n_io, @ssl) Iodine.run n_io, @ssl, &(@accept_proc) end rescue Errno::EWOULDBLOCK => e rescue => e n_io.close if n_io && !n_io.closed? @stop = true raise e end end |