Sha256: 9685d30c27c9587f7e8713e906443a068e92bf08ad81a9ccc53be61843d53970

Contents?: true

Size: 984 Bytes

Versions: 20

Compression:

Stored size: 984 Bytes

Contents

class Goliath::Connection
  attr_accessor :socket_stream
  alias :goliath_receive_data :receive_data

  def receive_data(data)
    if @serving == :websocket
      socket_stream.receive(data) if socket_stream
    else
      goliath_receive_data(data)
      socket_stream.receive(@parser.upgrade_data) if socket_stream
      @serving = :websocket if @api.websocket?
    end
  end

  def unbind
    super
  ensure
    socket_stream.fail if socket_stream
  end
end

class Goliath::API
  include Faye::WebSocket::Adapter
  alias :goliath_call :call

  def call(env)
    @env = env
    goliath_call(env)
  end
end

class Goliath::Request
  alias :goliath_process :process

  def process
    env['em.connection'] = conn
    goliath_process
  end
end

class Goliath::Response
  alias :goliath_head :head
  alias :goliath_headers_output :headers_output

  def head
    (status == 101) ? '' : goliath_head
  end

  def headers_output
    (status == 101) ? '' : goliath_headers_output
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
faye-websocket-0.11.3 lib/faye/adapters/goliath.rb
faye-websocket-0.11.2 lib/faye/adapters/goliath.rb
faye-websocket-0.11.1 lib/faye/adapters/goliath.rb
faye-websocket-0.11.0 lib/faye/adapters/goliath.rb
faye-websocket-0.10.9 lib/faye/adapters/goliath.rb
faye-websocket-0.10.8 lib/faye/adapters/goliath.rb
faye-websocket-0.10.7 lib/faye/adapters/goliath.rb
faye-websocket-0.10.6 lib/faye/adapters/goliath.rb
faye-websocket-0.10.5 lib/faye/adapters/goliath.rb
faye-websocket-0.10.4 lib/faye/adapters/goliath.rb
faye-websocket-0.10.3 lib/faye/adapters/goliath.rb
faye-websocket-0.10.2 lib/faye/adapters/goliath.rb
faye-websocket-0.10.1 lib/faye/adapters/goliath.rb
faye-websocket-0.10.0 lib/faye/adapters/goliath.rb
faye-websocket-0.9.2 lib/faye/adapters/goliath.rb
faye-websocket-0.9.1 lib/faye/adapters/goliath.rb
faye-websocket-0.9.0 lib/faye/adapters/goliath.rb
faye-websocket-0.8.0 lib/faye/adapters/goliath.rb
faye-websocket-0.7.5 lib/faye/adapters/goliath.rb
faye-websocket-0.7.4 lib/faye/adapters/goliath.rb