module Faye::Engine
Constants
- ID_LENGTH
- INTERVAL
- MAX_DELAY
- METHODS
- TIMEOUT
Public Class Methods
ensure_reactor_running!()
click to toggle source
# File lib/faye/engines/proxy.rb, line 13 def self.ensure_reactor_running! Thread.new { EventMachine.run } unless EventMachine.reactor_running? Thread.pass until EventMachine.reactor_running? end
get(options)
click to toggle source
# File lib/faye/engines/proxy.rb, line 18 def self.get(options) Proxy.new(options) end
random(bitlength = ID_LENGTH)
click to toggle source
# File lib/faye/engines/proxy.rb, line 22 def self.random(bitlength = ID_LENGTH) limit = 2 ** bitlength max_size = (bitlength * Math.log(2) / Math.log(36)).ceil string = SecureRandom.random_number(limit).to_s(36) string = '0' + string while string.size < max_size string end