module EventMachine::WebSocket

Public Class Methods

run(options) { |c| ... } click to toggle source
# File lib/diamond/osc.rb, line 95
def self.run(options)
  host, port = options.values_at(:host, :port)
  EM.start_server(host, port, Connection, options) do |c|
    yield c
  end
end
start(options, &blk) click to toggle source
# File lib/diamond/osc.rb, line 85
def self.start(options, &blk)
  #EM.epoll
  #EM.run {
    trap("TERM") { stop }
    trap("INT")  { stop }

    run(options, &blk)
  #}
end