Module: GameServer::ServerStarter::ClassMethods
- Defined in:
- lib/server_starter.rb
Instance Method Summary collapse
Instance Method Details
#listner(klass) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/server_starter.rb', line 12 def listner(klass) module_eval %( def self.start_server(opts = { }) opts[:port] ||= 10667 opts[:host] ||= '172.16.90.1' EventMachine::run { EventMachine::start_server opts[:host], opts[:port], #{klass} } end ) end |