跳至内容 跳至搜索
命名空间
方法
C

实例公共方法

connection_identifier()

返回一个单独的连接标识符,该标识符将所有已注册标识符的值组合成一个 gid。

# File actioncable/lib/action_cable/connection/identification.rb, line 29
def connection_identifier
  unless defined? @connection_identifier
    @connection_identifier = connection_gid identifiers.filter_map { |id| instance_variable_get("@#{id}") }
  end

  @connection_identifier
end