Class: Rage::Cable::WebSocketConnection Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/rage/cable/cable.rb

Overview

This class is abstract.

Instance Method Summary collapse

Instance Method Details

#closeObject

Close the connection.



177
178
179
180
# File 'lib/rage/cable/cable.rb', line 177

module Adapters
  autoload :Base, "rage/cable/adapters/base"
  autoload :Redis, "rage/cable/adapters/redis"
end

#subscribe(name) ⇒ Object

Subscribe to a channel.

Parameters:

  • name (String)

    the channel name



177
178
179
180
# File 'lib/rage/cable/cable.rb', line 177

module Adapters
  autoload :Base, "rage/cable/adapters/base"
  autoload :Redis, "rage/cable/adapters/redis"
end

#unsubscribe(name) ⇒ Object

Unsubscribe from a channel.

Parameters:

  • name (String)

    the channel name



177
178
179
180
# File 'lib/rage/cable/cable.rb', line 177

module Adapters
  autoload :Base, "rage/cable/adapters/base"
  autoload :Redis, "rage/cable/adapters/redis"
end

#write(data) ⇒ Object

Write data to the connection.

Parameters:

  • data (String)

    the data to write



177
178
179
180
# File 'lib/rage/cable/cable.rb', line 177

module Adapters
  autoload :Base, "rage/cable/adapters/base"
  autoload :Redis, "rage/cable/adapters/redis"
end