Class: AMQ::Protocol::Connection::Open
- Defined in:
- lib/amq/protocol/client.rb
Class Method Summary collapse
-
.encode(virtual_host) ⇒ Object
[u“virtual_host = u’/‘”, u’capabilities = EMPTY_STRING’, u’insist = false’].
- .has_content? ⇒ Boolean
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’
390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/amq/protocol/client.rb', line 390 def self.encode(virtual_host) capabilities = EMPTY_STRING insist = false channel = 0 buffer = @packed_indexes.dup 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
384 385 386 |
# File 'lib/amq/protocol/client.rb', line 384 def self.has_content? false end |