require 'hara/base' require 'json' Celluloid.logger = nil class FayeSocket attr_accessor :remote_ip def initialize @client_messages = [] @server_messages = [] end def alive? @alive end def close @alive = false end def read @server_messages.shift end def << message @client_messages << message end def client_read @client_messages.shift end def client_send message @server_messages << message end end