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 #

Instance Method Detail

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

Only returns connections opened on this instance.


def add_connection(connection) #

def backend : Cable::BackendCore #

def backend_publish #

def backend_subscribe #

def connections : Hash(String, Cable::Connection) #

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


def count_error! #

def errors : Int32 #

def fiber_channel : Channel({String, String}) #

def pinger : Cable::BackendPinger #

def publish(channel : String, message : String) #

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


def remote_connections #

def remove_connection(connection_id) #

def restart? #

def safe_decode_message(message) #

def send_to_channels(channel_identifier, message) #

def send_to_internal_connections(connection_identifier : String, message : String) #

def shutdown #

def subscribe_channel(channel : Channel, identifier : String) #

def subscribed_channels_for(token : String) : Array(Channel) #

Only returns channel subscriptions opened on this instance.


def unsubscribe_channel(channel : Channel, identifier : String) #