class LiteCable::Connection::Streams
Manage the connection streams
Attributes
socket[R]
Public Class Methods
new(socket)
click to toggle source
# File lib/lite_cable/connection/streams.rb, line 9 def initialize(socket) @socket = socket end
Public Instance Methods
add(channel_id, broadcasting)
click to toggle source
Start streaming from broadcasting to the channel.
# File lib/lite_cable/connection/streams.rb, line 14 def add(channel_id, broadcasting) socket.subscribe(channel_id, broadcasting) end
remove(channel_id, broadcasting)
click to toggle source
Stop streaming from broadcasting to the channel.
# File lib/lite_cable/connection/streams.rb, line 19 def remove(channel_id, broadcasting) socket.unsubscribe(channel_id, broadcasting) end
remove_all(channel_id)
click to toggle source
Stop all streams for the channel
# File lib/lite_cable/connection/streams.rb, line 24 def remove_all(channel_id) socket.unsubscribe_from_all(channel_id) end