Module: SocketIo::Websocket::CarrierWave
- Included in:
- SocketIo::Websocket
- Defined in:
- lib/socket.io/websocket/carrier_wave.rb
Constant Summary collapse
- @@cache =
{}
Instance Method Summary collapse
- #init_session ⇒ Object
- #session ⇒ Object
- #session=(cid) ⇒ Object
- #session_id ⇒ Object
- #session_key ⇒ Object
Instance Method Details
#init_session ⇒ Object
6 7 8 9 10 11 |
# File 'lib/socket.io/websocket/carrier_wave.rb', line 6 def init_session if session.nil? send_connect self.session = Time.now end end |
#session ⇒ Object
20 21 22 |
# File 'lib/socket.io/websocket/carrier_wave.rb', line 20 def session @@cache[session_key] end |
#session=(cid) ⇒ Object
23 24 25 |
# File 'lib/socket.io/websocket/carrier_wave.rb', line 23 def session=(cid) @@cache[session_key] = cid end |
#session_id ⇒ Object
13 14 15 |
# File 'lib/socket.io/websocket/carrier_wave.rb', line 13 def session_id params[:session_id] end |
#session_key ⇒ Object
17 18 19 |
# File 'lib/socket.io/websocket/carrier_wave.rb', line 17 def session_key 'sessions/' + session_id end |