aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/lib/action_cable.rb')
-rw-r--r--actioncable/lib/action_cable.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/actioncable/lib/action_cable.rb b/actioncable/lib/action_cable.rb
new file mode 100644
index 0000000000..3919812161
--- /dev/null
+++ b/actioncable/lib/action_cable.rb
@@ -0,0 +1,31 @@
+require 'active_support'
+require 'active_support/rails'
+require 'action_cable/version'
+
+module ActionCable
+ extend ActiveSupport::Autoload
+
+ INTERNAL = {
+ identifiers: {
+ ping: '_ping'.freeze
+ },
+ message_types: {
+ confirmation: 'confirm_subscription'.freeze,
+ rejection: 'reject_subscription'.freeze
+ }
+ }
+
+ # Singleton instance of the server
+ module_function def server
+ @server ||= ActionCable::Server::Base.new
+ end
+
+ eager_autoload do
+ autoload :Server
+ autoload :Connection
+ autoload :Channel
+ autoload :RemoteConnections
+ end
+end
+
+require 'action_cable/engine' if defined?(Rails)