Subscription
传递消息,以及真正干活的好手。
传递消息到 Channel#action
常用的:
# 封装下面的 send
perform
其它:
# 实质是 consumer.send -> connection.send
send
unsubscribe
创建 subscription 需要 channel.
常用方法 perform
可以在 Coffee 里调用 Channel 里的 action.
Subscription#perform -> Subscription#send -> Consumer#send -> Connection#send -> WebSocket#send
回调响应,及真正干活
我们可以(和普通 JS 一样)在它的基础上自定义方法,进行调用。
最后更新于
这有帮助吗?