класс ActionCable::RemoteConnections::RemoteConnection
Удаленное соединение Action Cable
Представляет одно удалённое соединение, найденное с помощью ActionCable.server.remote_connections.where(*). Существует только для вызова disconnect для этого соединения.
Атрибуты
сервер[Ч]
Публичные методы класса
# File actioncable/lib/action_cable/remote_connections.rb, line 53 def initialize(server, ids) @server = server set_identifier_instance_vars(ids) end
Публичные методы экземпляра
# File actioncable/lib/action_cable/remote_connections.rb, line 59
def disconnect(reconnect: true)
server.broadcast internal_channel, { type: "disconnect", reconnect: reconnect }
end Использует внутренний канал для отключения соединения.
© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.