lib/submodules/ably-ruby/lib/ably/realtime/connection.rb in ably-rest-0.7.5 vs lib/submodules/ably-ruby/lib/ably/realtime/connection.rb in ably-rest-0.8.1
- old
+ new
@@ -8,20 +8,22 @@
# initialized: 0
# connecting: 1
# connected: 2
# disconnected: 3
# suspended: 4
- # closed: 5
- # failed: 6
+ # closing: 5
+ # closed: 6
+ # failed: 7
#
# Note that the states are available as Enum-like constants:
#
# Connection::STATE.Initialized
# Connection::STATE.Connecting
# Connection::STATE.Connected
# Connection::STATE.Disconnected
# Connection::STATE.Suspended
+ # Connection::STATE.Closing
# Connection::STATE.Closed
# Connection::STATE.Failed
#
# Connection emit errors - use `on(:error)` to subscribe to errors
#
@@ -148,10 +150,10 @@
# The elapsed milliseconds is passed as an argument to the block and represents the time taken to echo a ping heartbeat once the connection is in the `:connected` state.
#
# @yield [Integer] if a block is passed to this method, then this block will be called once the ping heartbeat is received with the time elapsed in milliseconds
#
# @example
- # client = Ably::Rest::Client.new(api_key: 'key.id:secret')
+ # client = Ably::Rest::Client.new(key: 'key.id:secret')
# client.connection.ping do |ms_elapsed|
# puts "Ping took #{ms_elapsed}ms"
# end
#
# @return [void]