Module: Rack::WebSocket::Extensions::Thin::Connection

Defined in:
lib/rack/websocket/extensions/thin/connection.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
10
11
12
# File 'lib/rack/websocket/extensions/thin/connection.rb', line 7

def self.included(base)
  base.class_eval do
    alias :pre_process_without_websocket :pre_process
    alias :pre_process :pre_process_with_websocket
  end
end

Instance Method Details

#pre_process_with_websocketObject

Set ‘async.connection’ Rack env



15
16
17
18
# File 'lib/rack/websocket/extensions/thin/connection.rb', line 15

def pre_process_with_websocket
  @request.env['async.connection'] = self
  pre_process_without_websocket
end