Class: Evma::TcpServerFactory
- Inherits:
-
ProtocolFactory
- Object
- Protocol
- ProtocolFactory
- Evma::TcpServerFactory
- Defined in:
- lib/evma/factory.rb
Instance Attribute Summary
Attributes inherited from Protocol
Instance Method Summary collapse
- #accept(new_obj) ⇒ Object
-
#initialize(server, port, protocol_handler = Evma::Protocol) ⇒ TcpServerFactory
constructor
A new instance of TcpServerFactory.
Methods inherited from Protocol
#close, #close_after_writing, #unbind
Constructor Details
#initialize(server, port, protocol_handler = Evma::Protocol) ⇒ TcpServerFactory
Returns a new instance of TcpServerFactory.
62 63 64 65 66 67 68 |
# File 'lib/evma/factory.rb', line 62 def initialize server, port, protocol_handler = Evma::Protocol Evma::Reactor.instance # ensure initialization sig = EventMachine.start_tcp_server server, port super sig @protocol_handler = protocol_handler Evma::Container.store self end |