Top Level Namespace

Defined Under Namespace

Modules: Pandemic

Constant Summary collapse

TCP_NO_DELAY_AVAILABLE =
RUBY_VERSION < '1.9' ? Socket.constants.include?('TCP_NODELAY') : Socket.constants.include?(:TCP_NODELAY)
MONITOR_TIMEOUT_AVAILABLE =
(RUBY_VERSION < '1.9')

Instance Method Summary collapse

Instance Method Details

#epidemic!(options = {}) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/pandemic.rb', line 33

def epidemic!(options = {})
  if $pandemic_logger.nil?
    $pandemic_logger = Logger.new(options[:log_file] || "pandemic.log")
    $pandemic_logger.level = options[:log_level] || Logger::INFO
    $pandemic_logger.datetime_format = "%Y-%m-%d %H:%M:%S "
  end
  Pandemic::ServerSide::Server.boot(options[:bind_to])
end