class ActionCable::RemoteConnections::RemoteConnection

Parent:
Object
Included modules:
ActionCable::Connection::Identification, ActionCable::Connection::InternalChannel

Represents a single remote connection found via ActionCable.server.remote_connections.where(*). Exists solely for the purpose of calling disconnect on that connection.

Public Class Methods

new(server, ids) Show source
# File actioncable/lib/action_cable/remote_connections.rb, line 37
def initialize(server, ids)
  @server = server
  set_identifier_instance_vars(ids)
end

Public Instance Methods

disconnect() Show source
# File actioncable/lib/action_cable/remote_connections.rb, line 43
def disconnect
  server.broadcast internal_channel, type: 'disconnect'
end

Uses the internal channel to disconnect the connection.

identifiers() Show source
# File actioncable/lib/action_cable/remote_connections.rb, line 48
def identifiers
  server.connection_identifiers
end

Returns all the identifiers that were applied to this connection.

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