Module: ServerEngine

Extended by:
ClassMethods
Defined in:
lib/serverengine.rb,
lib/serverengine/utils.rb,
lib/serverengine/daemon.rb,
lib/serverengine/server.rb,
lib/serverengine/worker.rb,
lib/serverengine/signals.rb,
lib/serverengine/version.rb,
lib/serverengine/winsock.rb,
lib/serverengine/privilege.rb,
lib/serverengine/supervisor.rb,
lib/serverengine/blocking_flag.rb,
lib/serverengine/config_loader.rb,
lib/serverengine/daemon_logger.rb,
lib/serverengine/signal_thread.rb,
lib/serverengine/command_sender.rb,
lib/serverengine/socket_manager.rb,
lib/serverengine/embedded_server.rb,
lib/serverengine/process_manager.rb,
lib/serverengine/multi_spawn_server.rb,
lib/serverengine/socket_manager_win.rb,
lib/serverengine/multi_thread_server.rb,
lib/serverengine/multi_worker_server.rb,
lib/serverengine/socket_manager_unix.rb,
lib/serverengine/multi_process_server.rb

Overview

ServerEngine

Copyright © 2012-2013 Sadayuki Furuhashi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Defined Under Namespace

Modules: ClassMethods, CommandSender, ConfigLoader, Privilege, RbWinSock, Signals, SocketManager, SocketManagerUnix, SocketManagerWin, Win32, WinSock Classes: BlockingFlag, Daemon, DaemonLogger, EmbeddedServer, MultiProcessServer, MultiSpawnServer, MultiThreadServer, MultiWorkerServer, ProcessManager, Server, SignalThread, Supervisor, Worker

Constant Summary collapse

VERSION =
"2.4.0"

Class Method Summary collapse

Methods included from ClassMethods

dump_uncaught_error, format_join_status, format_signal_name

Class Method Details

.create(server_module, worker_module, load_config_proc = {}, &block) ⇒ Object



32
33
34
# File 'lib/serverengine.rb', line 32

def self.create(server_module, worker_module, load_config_proc={}, &block)
  Daemon.new(server_module, worker_module, load_config_proc, &block)
end

.ruby_bin_pathObject



36
37
38
39
40
41
42
# File 'lib/serverengine.rb', line 36

def self.ruby_bin_path
  if ServerEngine.windows?
    ServerEngine::Win32.ruby_bin_path
  else
    File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["RUBY_INSTALL_NAME"]) + RbConfig::CONFIG["EXEEXT"]
  end
end

.windows?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/serverengine/utils.rb', line 23

def self.windows?
  IS_WINDOWS
end