Method: AMQ::Protocol::Basic::Cancel.decode
- Defined in:
- lib/amq/protocol/client.rb
.decode(data) ⇒ Object
1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 |
# File 'lib/amq/protocol/client.rb', line 1720 def self.decode(data) offset = offset = 0 # self-assigning offset to eliminate "assigned but unused variable" warning even if offset is not used in this method 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 |