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