Channel 补充
Broadcasting
类方法:
broadcast_to(model, message)
broadcasting_for它只是傀儡,最终交给 ActionCable.server 执行。
Callbacks
相关回调操作:
after_subscribe & on_subscribe
after_unsubscribe & on_unsubscribe
before_subscribe
before_unsubscribeNaming
channel_name通过此方法,可以获取通道名字:
Periodic Timers
可以在 Channel 里使用的类方法,周期性的执行某个指定的回调或 action.
算是一个配置,也不是真正执行。
最后更新于
这有帮助吗?