class

Cable::RemoteConnections

Inherits Reference < Object

Constructors

new(server : Cable::Server)
Source

Instance methods

find(identifier : String) : RemoteConnection

Specify the value of your connection's identified_by

# e.g.
# identified_by :user_id
# self.user_id = 1234.to_s

find("1234")

NOTE: This code may run on a different machine than where the @server.connections is actually sitting in memory. For this reason, we just pass the value right through the backend (i.e. redis), and let that broadcast out to all running instances.

Source