class Cable::RemoteConnections

Defined in:

cable/remote_connections.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(server : Cable::Server) #

[View source]

Instance Method Detail

def 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.


[View source]