Spec-Zone.ru › Ruby on Rails 8.0

класс ActionCable::RemoteConnections::RemoteConnection

Родитель:
Объект

Удаленное подключение Action Cable

Представляет собой одно удалённое подключение, найденное с помощью ActionCable.server.remote_connections.where(*). Существует только для вызова disconnect для этого подключения.

Атрибуты

сервер[R]

Публичные методы класса

new(сервер, ids) Показать исходный код
# File actioncable/lib/action_cable/remote_connections.rb, line 52
def initialize(server, ids)
  @server = server
  set_identifier_instance_vars(ids)
end

Публичные методы экземпляра

отключить(reconnect: true) Показать исходный код
# 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.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API