lib/ably/models/connection_details.rb in ably-1.1.7 vs lib/ably/models/connection_details.rb in ably-1.1.8

- old
+ new

@@ -19,10 +19,16 @@ # the message immediately, without communicating with the Ably service # class ConnectionDetails include Ably::Modules::ModelCommon + # Max message size + MAX_MESSAGE_SIZE = 65536 # See spec TO3l8 + + # Max frame size + MAX_FRAME_SIZE = 524288 # See spec TO3l9 + # @param attributes [Hash] # @option attributes [String] :client_id contains the client ID assigned to the connection # @option attributes [String] :connection_key the connection secret key string that is used to resume a connection and its state # @option attributes [Integer] :max_message_size maximum individual message size in bytes # @option attributes [Integer] :max_frame_size maximum size for a single frame of data sent to Ably. This restriction applies to a {Ably::Models::ProtocolMessage} sent over a realtime connection, or the total body size for a REST request @@ -36,11 +42,11 @@ [:connection_state_ttl, :max_idle_interval].each do |duration_field| if self.attributes[duration_field] self.attributes[duration_field] = (self.attributes[duration_field].to_f / 1000).round end end - self.attributes[:max_message_size] ||= 65536 - self.attributes[:max_frame_size] ||= 524288 + self.attributes[:max_message_size] ||= MAX_MESSAGE_SIZE + self.attributes[:max_frame_size] ||= MAX_FRAME_SIZE self.attributes.freeze end %w(client_id connection_key max_message_size max_frame_size max_inbound_rate connection_state_ttl max_idle_interval server_id).each do |attribute| define_method attribute do