Class: Evma::ProtocolFactory

Inherits:
Protocol show all
Defined in:
lib/evma/factory.rb

Direct Known Subclasses

TcpServerFactory

Instance Attribute Summary

Attributes inherited from Protocol

#signature

Instance Method Summary collapse

Methods inherited from Protocol

#close, #close_after_writing, #initialize, #unbind

Constructor Details

This class inherits a constructor from Evma::Protocol

Instance Method Details

#accept(new_object) ⇒ Object

– default implementation raises an exception. we expect subclasses to override this. we can’t do anything reasonable here because



33
34
35
36
37
# File 'lib/evma/factory.rb', line 33

def accept new_object
  # don't bother calling Evma::Reactor.instance, since only Reactor can call accept
  Evma::Container.store Evma::Protocol.new( new_object )
  EventMachine.close_connection new_object, false
end