class

Cable::Channel

Inherits Reference < Object

Constants

CHANNELS = {} of String => Cable::Channel.class

Constructors

new(connection : Cable::Connection, identifier : String, params : Hash(String, Cable::Payload::RESULT))
Source

Class methods

broadcast_to(channel : String, message : JSON::Any | Hash(String, String))
Source
broadcast_to(channel : String, message : String)

It's important that we don't call message.to_json

Source

Instance methods

broadcast(message : String | JSON::Any | Hash(String, String))
Source
close
Source
connection
Source
identifier
Source
params
Source
perform(action, message)
Source
receive(message)
Source
reject
Source
run_after_subscribed_callbacks

@override in after_subscribed macro

Source
stream_from(stream_identifier : String | Symbol)
Source
stream_identifier
Source
subscribed
Source
subscription_rejected?
Source
transmit(message : String | JSON::Any | Hash(String, String))

broadcast single message to single connection for this channel

Source
unsubscribed
Source

Macros

after_subscribed(*callbacks)

Run block after the subscription is created.

Source