class Cable::Server
- Cable::Server
- Reference
- Object
Included Modules
Defined in:
cable/server.crConstructors
Instance Method Summary
-
#active_connections_for(token : String) : Array(Connection)
Only returns connections opened on this instance.
- #add_connection(connection)
- #backend : Cable::BackendCore
- #backend_publish
- #backend_subscribe
-
#connections : Hash(String, Cable::Connection)
The String key is the
connection_identifier
value forCable::Connection
- #count_error!
- #errors : Int32
- #fiber_channel : Channel({String, String})
- #pinger : Cable::BackendPinger
-
#publish(channel : String, message : String)
Some backends only accept strings, so we should be strict here
- #remote_connections
- #remove_connection(connection_id)
- #restart?
- #safe_decode_message(message)
- #send_to_channels(channel_identifier, message)
- #send_to_internal_connections(connection_identifier : String, message : String)
- #shutdown
- #subscribe_channel(channel : Channel, identifier : String)
-
#subscribed_channels_for(token : String) : Array(Channel)
Only returns channel subscriptions opened on this instance.
- #unsubscribe_channel(channel : Channel, identifier : String)
Constructor Detail
Instance Method Detail
def active_connections_for(token : String) : Array(Connection)
#
Only returns connections opened on this instance.
def connections : Hash(String, Cable::Connection)
#
The String key is the connection_identifier
value for Cable::Connection
def publish(channel : String, message : String)
#
Some backends only accept strings, so we should be strict here
Only returns channel subscriptions opened on this instance.