Sha256: ccd7289f756eda338113d78d5bedd1e7e89ff4deed8d829412451a8d559b7332
Contents?: true
Size: 595 Bytes
Versions: 2
Compression:
Stored size: 595 Bytes
Contents
module GameMachine class MonoServer attr_reader :mono_path def initialize @mono_path = File.join(GameMachine.app_root,'mono','server') end def run! # mono server blocks. We run in a loop so if it dies or we restart it, # it will just get restarted Thread.new do loop do case RbConfig::CONFIG['host_os'] when /mswin|windows/i system("cd #{mono_path} && server.exe") else system("cd #{mono_path} && mono server.exe") end sleep 10 end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
game_machine-1.0.4 | lib/game_machine/mono_server.rb |
game_machine-1.0.2 | lib/game_machine/mono_server.rb |