module Cable

Overview

TODO Write documentation for Cable

Included Modules

Defined in:

backend/dev/backend.cr
cable.cr
cable/backend_core.cr
cable/backend_pinger.cr
cable/channel.cr
cable/connection.cr
cable/debug.cr
cable/handler.cr
cable/logger.cr
cable/payload.cr
cable/remote_connections.cr
cable/server.cr
cable/websocket_pinger.cr

Constant Summary

HABITAT_SETTINGS = [{decl: route : String = Cable.message(:default_mount_path), example: "/cable", validation: nil}, {decl: token : String = "token", example: "token", validation: nil}, {decl: url : String = ENV["CABLE_BACKEND_URL"], example: "redis://localhost:6379", validation: nil}, {decl: disable_sec_websocket_protocol_header : Bool = false, example: nil, validation: nil}, {decl: backend_class : Cable::BackendCore.class = Cable::BackendRegistry, example: "Cable::RedisBackend", validation: nil}, {decl: backend_ping_interval : Time::Span = 15.seconds, example: nil, validation: nil}, {decl: restart_error_allowance : Int32 = 20, example: nil, validation: nil}, {decl: on_error : Proc(Exception, String, Nil) = ->(exception : Exception, message : String) do Cable::Logger.error(exception: exception) do message end end, example: nil, validation: nil}] of Nil
INTERNAL = {message_types: {welcome: "welcome", disconnect: "disconnect", ping: "ping", confirmation: "confirm_subscription", rejection: "reject_subscription", unsubscribe: "confirm_unsubscription"}, channel: "_internal", disconnect_reasons: {unauthorized: "unauthorized", invalid_request: "invalid_request", server_restart: "server_restart", remote: "remote"}, default_mount_path: "/cable", protocols: ["actioncable-v1-json", "actioncable-unsupported"]}
Logger = Log.for(self)
VERSION = "0.3.1"

Class Method Summary

Instance Method Summary

Class Method Detail

def self.configure(&) #

def self.message(event : Symbol) #

def self.reset_server #

def self.restart #

def self.server #

def self.settings #

Instance Method Detail

def settings #