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

“virtual_host = ”/“”, “capabilities = EMPTY_STRING”, “insist = false”

Returns:



462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# File 'lib/amq/protocol/client.rb', line 462

def self.encode(virtual_host)
  capabilities = EMPTY_STRING
  insist = false
  channel = 0
  buffer = ""
  buffer << @packed_indexes
  buffer << virtual_host.bytesize.chr
  buffer << virtual_host
  buffer << capabilities.bytesize.chr
  buffer << capabilities
  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)


456
457
458
# File 'lib/amq/protocol/client.rb', line 456

def self.has_content?
  false
end