class AMQ::Protocol::Basic::Cancel
Attributes
consumer_tag[R]
nowait[R]
Public Class Methods
decode(data)
click to toggle source
@return
# File lib/amq/protocol/client.rb, line 1645 def self.decode(data) offset = 0 length = data[offset, 1].unpack(PACK_CHAR).first offset += 1 consumer_tag = data[offset, length] offset += length bit_buffer = data[offset, 1].unpack(PACK_CHAR).first offset += 1 nowait = (bit_buffer & (1 << 0)) != 0 self.new(consumer_tag, nowait) end
encode(channel, consumer_tag, nowait)
click to toggle source
@return
- u'consumer_tag = nil', u'nowait = false'
# File lib/amq/protocol/client.rb, line 1669 def self.encode(channel, consumer_tag, nowait) buffer = @packed_indexes.dup buffer << consumer_tag.to_s.bytesize.chr buffer << consumer_tag.to_s bit_buffer = 0 bit_buffer = bit_buffer | (1 << 0) if nowait buffer << [bit_buffer].pack(PACK_CHAR) MethodFrame.new(buffer, channel) end
has_content?()
click to toggle source
# File lib/amq/protocol/client.rb, line 1663 def self.has_content? false end
new(consumer_tag, nowait)
click to toggle source
# File lib/amq/protocol/client.rb, line 1658 def initialize(consumer_tag, nowait) @consumer_tag = consumer_tag @nowait = nowait end