abstract class WebChannels::WebChannel

Defined in:

webchannels.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(socket : HTTP::WebSocket, data : String, ctx : HTTP::Server::Context) #

[View source]

Class Method Detail

def self.authenticate(socket, data, ctx) #

Override me


[View source]
def self.broadcast(topic, data) #

[View source]
def self.chan_by_socket(socket : HTTP::WebSocket) #

[View source]
def self.chan_by_socket!(socket) #

[View source]
def self.fanout(data : String | Bytes) #

[View source]
def self.join(socket, data, ctx) : Bool #

[View source]
def self.leave(socket : HTTP::WebSocket) #

[View source]
def self.pass_data(socket, data) #

[View source]

Instance Method Detail

def authorize(data : String) #

Override me


[View source]
def broadcast(topic, data) #

[View source]
def on_join(data : String) #

Override me


[View source]
def on_leave #

Override me


[View source]
def on_message(data : String) #

Override me


[View source]
def send(data : String | Bytes) #

[View source]
def socket : HTTP::WebSocket #

[View source]
def socket=(socket : HTTP::WebSocket) #

[View source]
def subscribe(topic : String) #

[View source]
def topics : Array(String) #

[View source]
def topics=(topics : Array(String)) #

[View source]
def unsubscribe(topic : String) #

[View source]