Sha256: 392e6641557f6f554b4f0e3f1cfdc24d65bc8fcdf6a202108044e95a2db6c2c0

Contents?: true

Size: 897 Bytes

Versions: 12

Compression:

Stored size: 897 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
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

12 entries across 12 versions & 2 rubygems

Version Path
faye-websocket-0.7.3 lib/faye/adapters/goliath.rb
faye-tls1-websocket-0.8.0 lib/faye/adapters/goliath.rb
faye-websocket-0.7.2 lib/faye/adapters/goliath.rb
faye-websocket-0.7.1 lib/faye/adapters/goliath.rb
faye-websocket-0.7.0 lib/faye/adapters/goliath.rb
faye-websocket-0.6.3 lib/faye/adapters/goliath.rb
faye-websocket-0.6.2 lib/faye/adapters/goliath.rb
faye-websocket-0.6.1 lib/faye/adapters/goliath.rb
faye-websocket-0.6.0 lib/faye/adapters/goliath.rb
faye-websocket-0.5.0 lib/faye/adapters/goliath.rb
faye-websocket-0.4.7-java lib/faye/adapters/goliath.rb
faye-websocket-0.4.7 lib/faye/adapters/goliath.rb