diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-02-22 22:55:39 -0300 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-02-22 22:55:39 -0300 |
commit | d3f0aa36c388310fbbbcab6295548dc18e385d0f (patch) | |
tree | b2a343ab2e99b11c279a6f47d355f381bd191689 /actioncable/lib/action_cable/server/base.rb | |
parent | b86bf3929c0cbbee2bd9b4bd0f6460bd7ba99e7b (diff) | |
parent | 05088b6299a39f4eb9b1da95b05d2e14e3c90c8e (diff) | |
download | rails-d3f0aa36c388310fbbbcab6295548dc18e385d0f.tar.gz rails-d3f0aa36c388310fbbbcab6295548dc18e385d0f.tar.bz2 rails-d3f0aa36c388310fbbbcab6295548dc18e385d0f.zip |
Merge pull request #23668 from maclover7/cable-docs
Full Action Cable documentation read through
Diffstat (limited to 'actioncable/lib/action_cable/server/base.rb')
-rw-r--r-- | actioncable/lib/action_cable/server/base.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/actioncable/lib/action_cable/server/base.rb b/actioncable/lib/action_cable/server/base.rb index fe48c112df..c3b64299e3 100644 --- a/actioncable/lib/action_cable/server/base.rb +++ b/actioncable/lib/action_cable/server/base.rb @@ -2,10 +2,10 @@ require 'thread' module ActionCable module Server - # A singleton ActionCable::Server instance is available via ActionCable.server. It's used by the rack process that starts the cable server, but - # also by the user to reach the RemoteConnections instead for finding and disconnecting connections across all servers. + # A singleton ActionCable::Server instance is available via ActionCable.server. It's used by the Rack process that starts the Action Cable server, but + # is also used by the user to reach the RemoteConnections object, which is used for finding and disconnecting connections across all servers. # - # Also, this is the server instance used for broadcasting. See Broadcasting for details. + # Also, this is the server instance used for broadcasting. See Broadcasting for more information. class Base include ActionCable::Server::Broadcasting include ActionCable::Server::Connections @@ -19,11 +19,10 @@ module ActionCable def initialize @mutex = Mutex.new - @remote_connections = @stream_event_loop = @worker_pool = @channel_classes = @pubsub = nil end - # Called by rack to setup the server. + # Called by Rack to setup the server. def call(env) setup_heartbeat_timer config.connection_class.new(self, env).process @@ -48,7 +47,7 @@ module ActionCable @worker_pool || @mutex.synchronize { @worker_pool ||= ActionCable::Server::Worker.new(max_size: config.worker_pool_size) } end - # Requires and returns a hash of all the channel class constants keyed by name. + # Requires and returns a hash of all of the channel class constants, which are keyed by name. def channel_classes @channel_classes || @mutex.synchronize do @channel_classes ||= begin @@ -63,7 +62,7 @@ module ActionCable @pubsub || @mutex.synchronize { @pubsub ||= config.pubsub_adapter.new(self) } end - # All the identifiers applied to the connection class associated with this server. + # All of the identifiers applied to the connection class associated with this server. def connection_identifiers config.connection_class.identifiers end |