aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/server/base.rb
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-02-13 21:05:04 -0500
committerJon Moss <me@jonathanmoss.me>2016-02-17 11:08:00 -0500
commit05088b6299a39f4eb9b1da95b05d2e14e3c90c8e (patch)
treefffce935c755af33108219fecc9b1da1b738ff04 /actioncable/lib/action_cable/server/base.rb
parent84826b4ea6cdb63f5e338aefd0574c048a35762d (diff)
downloadrails-05088b6299a39f4eb9b1da95b05d2e14e3c90c8e.tar.gz
rails-05088b6299a39f4eb9b1da95b05d2e14e3c90c8e.tar.bz2
rails-05088b6299a39f4eb9b1da95b05d2e14e3c90c8e.zip
Full Action Cable documentation read through
This PR checks all active Action Cable documentation for typos and other fixes. It aims to make sure that when Rails 5 is released, that the Action Cable docs are up to snuff with the other documentation included with Rails. [ci skip]
Diffstat (limited to 'actioncable/lib/action_cable/server/base.rb')
-rw-r--r--actioncable/lib/action_cable/server/base.rb13
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