Class: AMQ::Protocol::Connection::StartOk

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(client_properties, mechanism, response, locale) ⇒ Object

u’client_properties = nil’, u“mechanism = u’PLAIN’”, u’response = nil’, u“locale = u’en_US’”

Returns:



343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/amq/protocol/client.rb', line 343

def self.encode(client_properties, mechanism, response, locale)
  channel = 0
  buffer = ''
  buffer << @packed_indexes
  buffer << AMQ::Protocol::Table.encode(client_properties)
  buffer << mechanism.to_s.bytesize.chr
  buffer << mechanism.to_s
  buffer << [response.to_s.bytesize].pack(PACK_UINT32)
  buffer << response.to_s
  buffer << locale.to_s.bytesize.chr
  buffer << locale.to_s
  MethodFrame.new(buffer, channel)
end

.has_content?Boolean

Returns:

  • (Boolean)


337
338
339
# File 'lib/amq/protocol/client.rb', line 337

def self.has_content?
  false
end