Class: AMQ::Protocol::Connection::Secure

Inherits:
Method
  • Object
show all
Defined in:
lib/amq/protocol/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Method

encode_body, index, inherited, instantiate, method_id, methods, name, split_headers

Constructor Details

#initialize(challenge) ⇒ Secure

Returns a new instance of Secure.



376
377
378
# File 'lib/amq/protocol/client.rb', line 376

def initialize(challenge)
  @challenge = challenge
end

Instance Attribute Details

#challengeObject (readonly)

Returns the value of attribute challenge.



375
376
377
# File 'lib/amq/protocol/client.rb', line 375

def challenge
  @challenge
end

Class Method Details

.decode(data) ⇒ Object

Returns:



366
367
368
369
370
371
372
373
# File 'lib/amq/protocol/client.rb', line 366

def self.decode(data)
  offset = 0
  length = data[offset, 4].unpack(PACK_UINT32).first
  offset += 4
  challenge = data[offset, length]
  offset += length
  self.new(challenge)
end

.has_content?Boolean

Returns:

  • (Boolean)


380
381
382
# File 'lib/amq/protocol/client.rb', line 380

def self.has_content?
  false
end