Sha256: 278d07454aa392bb88bf4dbb98ade5b10efceb14dc8a76243fec2aac6fbc7bf3

Contents?: true

Size: 453 Bytes

Versions: 26

Compression:

Stored size: 453 Bytes

Contents

module GameServer::ServerStarter

  def self.included(base)
    base.extend(ClassMethods)
  end


  
  
  module ClassMethods
  
    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
    
  end


end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
game-server-0.6.0 lib/server_starter.rb
game-server-0.5.2 lib/server_starter.rb
game-server-0.5.1 lib/server_starter.rb
game-server-0.5.0 lib/server_starter.rb
game-server-0.4.12 lib/server_starter.rb
game-server-0.4.11 lib/server_starter.rb
game-server-0.4.10 lib/server_starter.rb
game-server-0.4.9 lib/server_starter.rb
game-server-0.4.8 lib/server_starter.rb
game-server-0.4.7 lib/server_starter.rb
game-server-0.4.6 lib/server_starter.rb
game-server-0.4.5 lib/server_starter.rb
game-server-0.4.4 lib/server_starter.rb
game-server-0.4.3 lib/server_starter.rb
game-server-0.4.2 lib/server_starter.rb
game-server-0.4.1 lib/server_starter.rb
game-server-0.4.0 lib/server_starter.rb
game-server-0.3.3 lib/server_starter.rb
game-server-0.3.2 lib/server_starter.rb
game-server-0.3.1 lib/server_starter.rb