1
我知道,在ActionCable平以這種方式工作:如何將消息發送到每一個連接
def beat
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
但是當我嘗試對連接傳輸,只有一個connecton得到我的消息transmit
爲什麼?
def connect
self.uuid = SecureRandom.uuid
transmit({'title': 'players_online', 'message': 'A new user has been subscribed'})
end
也許只有一個用戶?檢查誰訂閱。 – Sylar
@Sylar 3訂閱者 – Viktor
用更多代碼更新帖子,以便我可以複製。 – Sylar