struct Amber::WebSockets::SubscriptionManager

Overview

SubscriptionManager manages the list of channel subscriptions for the socket connection. Also handles dispatching actions (messages) to the appropriate channel.

Errors in one channel are isolated and do not affect other channels or crash the socket connection. Errors are forwarded to the channel's on_error callback and to the socket's handle_error method for reporting.

Defined in:

amber/websockets/subscription_manager.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def dispatch(client_socket, message) #

[View source]
def initialize #

[View source]
def subscriptions : Hash(String, Amber::WebSockets::Channel) #

[View source]
def subscriptions=(subscriptions : Hash(String, Amber::WebSockets::Channel)) #

[View source]