Class: AMQ::Protocol::Connection::Tune
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#channel_max ⇒ Object
readonly
Returns the value of attribute channel_max.
-
#frame_max ⇒ Object
readonly
Returns the value of attribute frame_max.
-
#heartbeat ⇒ Object
readonly
Returns the value of attribute heartbeat.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(channel_max, frame_max, heartbeat) ⇒ Tune
constructor
A new instance of Tune.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(channel_max, frame_max, heartbeat) ⇒ Tune
Returns a new instance of Tune.
416 417 418 419 420 |
# File 'lib/amq/protocol/client.rb', line 416 def initialize(channel_max, frame_max, heartbeat) @channel_max = channel_max @frame_max = frame_max @heartbeat = heartbeat end |
Instance Attribute Details
#channel_max ⇒ Object (readonly)
Returns the value of attribute channel_max.
415 416 417 |
# File 'lib/amq/protocol/client.rb', line 415 def channel_max @channel_max end |
#frame_max ⇒ Object (readonly)
Returns the value of attribute frame_max.
415 416 417 |
# File 'lib/amq/protocol/client.rb', line 415 def frame_max @frame_max end |
#heartbeat ⇒ Object (readonly)
Returns the value of attribute heartbeat.
415 416 417 |
# File 'lib/amq/protocol/client.rb', line 415 def heartbeat @heartbeat end |
Class Method Details
.decode(data) ⇒ Object
404 405 406 407 408 409 410 411 412 413 |
# File 'lib/amq/protocol/client.rb', line 404 def self.decode(data) offset = 0 channel_max = data[offset, 2].unpack(PACK_UINT16).first offset += 2 frame_max = data[offset, 4].unpack(PACK_UINT32).first offset += 4 heartbeat = data[offset, 2].unpack(PACK_UINT16).first offset += 2 self.new(channel_max, frame_max, heartbeat) end |
.has_content? ⇒ Boolean
422 423 424 |
# File 'lib/amq/protocol/client.rb', line 422 def self.has_content? false end |