class Cable::Server

Included Modules

Defined in:

cable/server.cr

Constructors

Instance Method Summary

Instance methods inherited from module Cable::Debug

debug debug, debug_json debug_json

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def active_connections_for(token : String) : Array(Connection) #

Only returns connections opened on this instance.


[View source]
def add_connection(connection) #

[View source]
def backend : Cable::BackendCore #

[View source]
def backend_publish #

[View source]
def backend_subscribe #

[View source]
def connections : Hash(String, Cable::Connection) #

Returns the current connections


[View source]
def count_error! #

[View source]
def errors : Int32 #

The String key is the connection_identifier value for Cable::Connection


[View source]
def fiber_channel : Channel({String, String}) #

[View source]
def pinger : Cable::BackendPinger #

[View source]
def publish(channel : String, message : String) #

Some backends only accept strings, so we should be strict here


[View source]
def remote_connections #

[View source]
def remove_connection(connection_id) #

[View source]
def restart? #

[View source]
def safe_decode_message(message) #

[View source]
def send_to_channels(channel_identifier, message) #

[View source]
def send_to_internal_connections(connection_identifier : String, message : String) #

[View source]
def shutdown #

[View source]
def subscribe_channel(channel : Channel, identifier : String) #

[View source]
def subscribed_channels_for(token : String) : Array(Channel) #

Only returns channel subscriptions opened on this instance.


[View source]
def unsubscribe_channel(channel : Channel, identifier : String) #

[View source]