method
broadcast
v6.1.3.1 -
Show latest stable
- Class:
ActionCable::Server::Broadcasting::Broadcaster
broadcast(message)public
No documentation available.
# File actioncable/lib/action_cable/server/broadcasting.rb, line 42
def broadcast(message)
server.logger.debug { "[ActionCable] Broadcasting to #{broadcasting}: #{message.inspect}" }
payload = { broadcasting: broadcasting, message: message, coder: coder }
ActiveSupport::Notifications.instrument("broadcast.action_cable", payload) do
encoded = coder ? coder.encode(message) : message
server.pubsub.broadcast broadcasting, encoded
end
end