Module: RealWeb

Defined in:
lib/realweb.rb,
lib/realweb/server.rb,
lib/realweb/thread_server.rb,
lib/realweb/forking_server.rb

Defined Under Namespace

Classes: ForkingServer, Server, ThreadServer

Constant Summary collapse

ServerUnreachable =
Class.new(RuntimeError)

Class Method Summary collapse

Class Method Details

.start_server_in_fork(*args) ⇒ Object Also known as: start_server


13
14
15
# File 'lib/realweb.rb', line 13

def start_server_in_fork(*args)
  ForkingServer.new(*args) { |server| server.start }
end

.start_server_in_thread(*args) ⇒ Object


9
10
11
# File 'lib/realweb.rb', line 9

def start_server_in_thread(*args)
  ThreadServer.new(*args) { |server| server.start }
end

.with_server_in_fork(*args, &block) ⇒ Object Also known as: with_server


22
23
24
# File 'lib/realweb.rb', line 22

def with_server_in_fork(*args, &block)
  ForkingServer.with_rackup(*args, &block)
end

.with_server_in_thread(*args, &block) ⇒ Object


18
19
20
# File 'lib/realweb.rb', line 18

def with_server_in_thread(*args, &block)
  ThreadServer.with_rackup(*args, &block)
end