Class: Push::Transport::Dispatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/push/transport.rb

Overview

Figure out which transport controller we’re going to use to service the request.

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



10
11
12
# File 'lib/push/transport.rb', line 10

def call(env)
  env['Upgrade'] == 'WebSocket' ? Controller::WebSocket.new.call(env) : Controller::HttpLongPoll.new.call(env)
end