Module: AsyncCable
- Defined in:
- lib/async_cable.rb,
lib/async_cable/util.rb,
lib/async_cable/config.rb,
lib/async_cable/errors.rb,
lib/async_cable/server.rb,
lib/async_cable/version.rb,
lib/async_cable/registry.rb,
lib/async_cable/connection.rb
Defined Under Namespace
Modules: Errors, Util Classes: Config, Connection, Registry, Server
Constant Summary collapse
- VERSION =
'0.2.3'
Class Method Summary collapse
-
.broadcast(data) ⇒ Object
Transmit data to all WS connections.
- .config ⇒ Async::Config
- .configure {|Async::Config| ... } ⇒ Object
Class Method Details
.broadcast(data) ⇒ Object
Transmit data to all WS connections.
23 24 25 26 |
# File 'lib/async_cable.rb', line 23 def broadcast(data) config.logger.debug { "#{name}.broadcast data=#{data.inspect}" } Registry.each { |conn| conn.transmit(data) } end |
.config ⇒ Async::Config
12 13 14 |
# File 'lib/async_cable.rb', line 12 def config @config ||= Config.new end |
.configure {|Async::Config| ... } ⇒ Object
17 18 19 |
# File 'lib/async_cable.rb', line 17 def configure yield config end |