Class: Merb::Rack::Ebb

Inherits:
AbstractAdapter show all
Defined in:
lib/merb-core/rack/adapter/ebb.rb

Class Method Summary collapse

Methods inherited from AbstractAdapter

exit_process, process_title, spawn_worker, start, start_at_port

Class Method Details

.new_server(port) ⇒ Object

start an Ebb server on given host and port. :api: plugin



9
10
11
12
13
# File 'lib/merb-core/rack/adapter/ebb.rb', line 9

def self.new_server(port)
  Merb::Dispatcher.use_mutex = false
  opts = @opts.merge(:port => port)
  @th = Thread.new { Thread.current[:server] = ::Ebb.start_server(opts[:app], opts) }
end

.start_serverObject

:api: plugin



16
17
18
# File 'lib/merb-core/rack/adapter/ebb.rb', line 16

def self.start_server
  @th.join
end

.stop(status = 0) ⇒ Object

:api: plugin



21
22
23
# File 'lib/merb-core/rack/adapter/ebb.rb', line 21

def self.stop(status = 0)
  ::Ebb.stop_server
end