Class: AnyCable::Rails::Server
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- AnyCable::Rails::Server
- Defined in:
- lib/anycable/rails/next/connection.rb
Overview
Wrap ActionCable.server to provide a custom executor and a pubsub adapter
Defined Under Namespace
Constant Summary collapse
- EXECUTOR =
A signleton executor for all connections
Executor.new.freeze
Instance Attribute Summary collapse
-
#executor ⇒ Object
Returns the value of attribute executor.
-
#pubsub ⇒ Object
Returns the value of attribute pubsub.
Class Method Summary collapse
Instance Attribute Details
#executor ⇒ Object
Returns the value of attribute executor.
59 60 61 |
# File 'lib/anycable/rails/next/connection.rb', line 59 def executor @executor end |
#pubsub ⇒ Object
Returns the value of attribute pubsub.
59 60 61 |
# File 'lib/anycable/rails/next/connection.rb', line 59 def pubsub @pubsub end |
Class Method Details
.for(server, socket) ⇒ Object
61 62 63 64 65 66 |
# File 'lib/anycable/rails/next/connection.rb', line 61 def self.for(server, socket) new(server).tap do |srv| srv.executor = EXECUTOR srv.pubsub = PubSub.new(socket) end end |