diff options
Diffstat (limited to 'lib/action_cable')
-rw-r--r-- | lib/action_cable/remote_connections.rb | 13 | ||||
-rw-r--r-- | lib/action_cable/server.rb | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/action_cable/remote_connections.rb b/lib/action_cable/remote_connections.rb new file mode 100644 index 0000000000..f9d7c49a27 --- /dev/null +++ b/lib/action_cable/remote_connections.rb @@ -0,0 +1,13 @@ +module ActionCable + class RemoteConnections + attr_reader :server + + def initialize(server) + @server = server + end + + def where(identifier) + RemoteConnection.new(server, identifier) + end + end +end diff --git a/lib/action_cable/server.rb b/lib/action_cable/server.rb index 51e246c232..222c77fd51 100644 --- a/lib/action_cable/server.rb +++ b/lib/action_cable/server.rb @@ -23,6 +23,10 @@ module ActionCable @pubsub ||= EM::Hiredis.connect(@redis_config['url']).pubsub end + def remote_connections + @remote_connections ||= RemoteConnections.new(self) + end + def connection_identifiers @connection_class.identifiers end |