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.
440 441 442 443 444 |
# File 'lib/amq/protocol/client.rb', line 440 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.
439 440 441 |
# File 'lib/amq/protocol/client.rb', line 439 def channel_max @channel_max end |
#frame_max ⇒ Object (readonly)
Returns the value of attribute frame_max.
439 440 441 |
# File 'lib/amq/protocol/client.rb', line 439 def frame_max @frame_max end |
#heartbeat ⇒ Object (readonly)
Returns the value of attribute heartbeat.
439 440 441 |
# File 'lib/amq/protocol/client.rb', line 439 def heartbeat @heartbeat end |
Class Method Details
.decode(data) ⇒ Object
428 429 430 431 432 433 434 435 436 437 |
# File 'lib/amq/protocol/client.rb', line 428 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
446 447 448 |
# File 'lib/amq/protocol/client.rb', line 446 def self.has_content? false end |