Sha256: 5d58d8fd6f5679fb83ac8c78e62d14a313a20c40a311695cf4511d550e211fd8
Contents?: true
Size: 686 Bytes
Versions: 1
Compression:
Stored size: 686 Bytes
Contents
require 'hara/base' Celluloid.logger = nil class FayeHandshake def headers_downcased {'host' => 'localhost:8080'} end end class FayeSocket attr_accessor :remote_ip def initialize @client_messages = [] @server_messages = [] @mri_peername = "\x02\x00\x00P\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00" @jruby_peername = "\x00\x02\x8Av\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00" end def get_peername defined?(JRuby) ? @jruby_peername : @mri_peername end def alive? @alive end def close @alive = false end def send message @client_messages << message end def client_read @client_messages.shift end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hara-0.2.1 | spec/spec_helper.rb |