Class: AMQ::Protocol::Connection::Open

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

Class Method Summary collapse

Methods inherited from Method

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

Class Method Details

.encode(virtual_host) ⇒ Object

u“virtual_host = u’/‘”, u’capabilities = EMPTY_STRING’, u’insist = false’

Returns:



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/amq/protocol/client.rb', line 481

def self.encode(virtual_host)
  capabilities = EMPTY_STRING
  insist = false
  channel = 0
  buffer = ''
  buffer << @packed_indexes
  buffer << virtual_host.to_s.bytesize.chr
  buffer << virtual_host.to_s
  buffer << capabilities.to_s.bytesize.chr
  buffer << capabilities.to_s
  bit_buffer = 0
  bit_buffer = bit_buffer | (1 << 0) if insist
  buffer << [bit_buffer].pack(PACK_CHAR)
  MethodFrame.new(buffer, channel)
end

.has_content?Boolean

Returns:

  • (Boolean)


475
476
477
# File 'lib/amq/protocol/client.rb', line 475

def self.has_content?
  false
end