Module: DefaultDangoReceive
- Included in:
- DangoServerFramework
- Defined in:
- lib/dango/default_dango_receive.rb
Overview
デフォルトのdango_receive_*群
Instance Method Summary collapse
-
#dango_receive__change_encode_type(ret_obj) ⇒ Object
action_nameがエンコード変更なら.
-
#dango_receive__notice_heart_beat(ret_obj) ⇒ Object
クライアントから来たheart_beatなら.
Instance Method Details
#dango_receive__change_encode_type(ret_obj) ⇒ Object
action_nameがエンコード変更なら
20 21 22 23 |
# File 'lib/dango/default_dango_receive.rb', line 20 def dango_receive__change_encode_type(ret_obj) logger.debug "dango_receive__change_encode_type: #{ret_obj['encode_type'].inspect}" session[:encode_type] = ret_obj['encode_type'] end |
#dango_receive__notice_heart_beat(ret_obj) ⇒ Object
クライアントから来たheart_beatなら
10 11 12 13 14 15 16 17 |
# File 'lib/dango/default_dango_receive.rb', line 10 def dango_receive__notice_heart_beat(ret_obj) logger.debug "dango_receive__notice_heart_beat:#{session[:sid]}:#{ret_obj['_hb_id']} " shared.transaction(:_heart_beat_time_hash) do |heart_beat_time_hash| heart_beat_time_hash[session[:sid]] = Time.now shared.commit(heart_beat_time_hash) end end |