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’
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
# File 'lib/amq/protocol/client.rb', line 491 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
485 486 487 |
# File 'lib/amq/protocol/client.rb', line 485 def self.has_content? false end |