lib/submodules/ably-ruby/lib/ably/realtime/connection/websocket_transport.rb in ably-rest-0.8.6 vs lib/submodules/ably-ruby/lib/ably/realtime/connection/websocket_transport.rb in ably-rest-0.8.9

- old
+ new

@@ -96,15 +96,24 @@ def __outgoing_protocol_msgbus__ @__outgoing_protocol_msgbus__ ||= create_pub_sub_message_bus end private - attr_reader :connection, :driver, :reason_closed + def driver + @driver + end + def connection + @connection + end + + def reason_closed + @reason_closed + end + # Send object down the WebSocket driver connection as a serialized string/byte array based on protocol # @param [Object] object to serialize and send to the WebSocket driver - # @api public def send_object(object) case client.protocol when :json driver.text(object.to_json) when :msgpack @@ -120,10 +129,10 @@ client.logger.debug "WebsocketTransport: Prot msg sent =>: #{protocol_message.action} #{protocol_message}" end end def clear_timer - if @timer + if defined?(@timer) && @timer @timer.cancel @timer = nil end end