Class/Module Index [+]

Quicksearch

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 1686
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 1710
def self.encode(channel, consumer_tag, nowait)
  buffer = ''
  buffer << @packed_indexes
  buffer << consumer_tag.bytesize.chr
  buffer << consumer_tag
  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 1704
def self.has_content?
  false
end
new(consumer_tag, nowait) click to toggle source
# File lib/amq/protocol/client.rb, line 1699
def initialize(consumer_tag, nowait)
  @consumer_tag = consumer_tag
  @nowait = nowait
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.