Class: Firehose::Rack::Consumer

Inherits:
Object
  • Object
show all
Defined in:
lib/firehose/rack/consumer.rb

Overview

Handles a subscription request over HTTP or WebSockets depeding on its abilities and binds that to the Firehose::Server::Subscription class, which is bound to a channel that gets published to.

Defined Under Namespace

Classes: HttpLongPoll, WebSocket

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



10
11
12
# File 'lib/firehose/rack/consumer.rb', line 10

def call(env)
  websocket_request?(env) ? websocket.call(env) : http_long_poll.call(env)
end