class Faye::WebSocket::RainbowsClient

Attributes

socket_stream[RW]

Public Instance Methods

app_call(*args) click to toggle source
Calls superclass method
# File lib/faye/adapters/rainbows_client.rb, line 37
def app_call(*args)
  @env['em.connection'] = self
  if args.first == NULL_IO and @hp.content_length == 0 and websocket?
    prepare_request_body
  else
    super
  end
end
on_read(data) click to toggle source
Calls superclass method
# File lib/faye/adapters/rainbows_client.rb, line 46
def on_read(data)
  if @state == :body and websocket? and @hp.body_eof?
    @state = :websocket
    @input.rewind
    app_call StringIO.new(@buf)
  else
    super
  end
end
receive_data(data) click to toggle source
Calls superclass method
# File lib/faye/adapters/rainbows_client.rb, line 32
def receive_data(data)
  return super unless @state == :websocket
  socket_stream.receive(data) if socket_stream
end
unbind() click to toggle source
Calls superclass method
# File lib/faye/adapters/rainbows_client.rb, line 56
def unbind
  super
ensure
  socket_stream.fail if socket_stream
end
write_headers(status, headers, *args) click to toggle source
Calls superclass method
# File lib/faye/adapters/rainbows_client.rb, line 62
def write_headers(status, headers, *args)
  super unless socket_connection? and status == 101
end