Spec-Zone.ru › Ruby on Rails 5.0

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

Родитель:
Объект
Включенные модули:
ActionCable::Connection::Identification, ActionCable::Connection::InternalChannel

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

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

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

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

disconnect() Показать исходный код
# File actioncable/lib/action_cable/remote_connections.rb, line 43
def disconnect
  server.broadcast internal_channel, type: 'disconnect'
end

Использует внутренний канал для разрыва соединения.

identifiers() Показать исходный код
# File actioncable/lib/action_cable/remote_connections.rb, line 48
def identifiers
  server.connection_identifiers
end

Возвращает все идентификаторы, применённые к этому соединению.

© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.

Spec-Zone.ru

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