lib/amq/protocol/client.rb in amq-protocol-2.1.0 vs lib/amq/protocol/client.rb in amq-protocol-2.2.0
- old
+ new
@@ -249,11 +249,11 @@
def self.has_content?
false
end
# @return
- # [u'client_properties = nil', u"mechanism = u'PLAIN'", u'response = nil', u"locale = u'en_US'"]
+ # ['client_properties = nil', "mechanism = 'PLAIN'", 'response = nil', "locale = 'en_US'"]
def self.encode(client_properties, mechanism, response, locale)
channel = 0
buffer = @packed_indexes.dup
buffer << AMQ::Protocol::Table.encode(client_properties)
buffer << mechanism.to_s.bytesize.chr
@@ -305,11 +305,11 @@
def self.has_content?
false
end
# @return
- # [u'response = nil']
+ # ['response = nil']
def self.encode(response)
channel = 0
buffer = @packed_indexes.dup
buffer << [response.to_s.bytesize].pack(PACK_UINT32)
buffer << response.to_s
@@ -360,11 +360,11 @@
def self.has_content?
false
end
# @return
- # [u'channel_max = false', u'frame_max = false', u'heartbeat = false']
+ # ['channel_max = false', 'frame_max = false', 'heartbeat = false']
def self.encode(channel_max, frame_max, heartbeat)
channel = 0
buffer = @packed_indexes.dup
buffer << [channel_max].pack(PACK_UINT16)
buffer << [frame_max].pack(PACK_UINT32)
@@ -384,11 +384,11 @@
def self.has_content?
false
end
# @return
- # [u"virtual_host = u'/'", u'capabilities = EMPTY_STRING', u'insist = false']
+ # ["virtual_host = '/'", 'capabilities = EMPTY_STRING', 'insist = false']
def self.encode(virtual_host)
capabilities = EMPTY_STRING
insist = false
channel = 0
buffer = @packed_indexes.dup
@@ -465,11 +465,11 @@
def self.has_content?
false
end
# @return
- # [u'reply_code = nil', u'reply_text = EMPTY_STRING', u'class_id = nil', u'method_id = nil']
+ # ['reply_code = nil', 'reply_text = EMPTY_STRING', 'class_id = nil', 'method_id = nil']
def self.encode(reply_code, reply_text, class_id, method_id)
channel = 0
buffer = @packed_indexes.dup
buffer << [reply_code].pack(PACK_UINT16)
buffer << reply_text.to_s.bytesize.chr
@@ -534,11 +534,11 @@
def self.has_content?
false
end
# @return
- # [u'reason = EMPTY_STRING']
+ # ['reason = EMPTY_STRING']
def self.encode(reason)
channel = 0
buffer = @packed_indexes.dup
buffer << reason.to_s.bytesize.chr
buffer << reason.to_s
@@ -594,11 +594,11 @@
def self.has_content?
false
end
# @return
- # [u'out_of_band = EMPTY_STRING']
+ # ['out_of_band = EMPTY_STRING']
def self.encode(channel, out_of_band)
buffer = @packed_indexes.dup
buffer << out_of_band.to_s.bytesize.chr
buffer << out_of_band.to_s
MethodFrame.new(buffer, channel)
@@ -657,11 +657,11 @@
def self.has_content?
false
end
# @return
- # [u'active = nil']
+ # ['active = nil']
def self.encode(channel, active)
buffer = @packed_indexes.dup
bit_buffer = 0
bit_buffer = bit_buffer | (1 << 0) if active
buffer << [bit_buffer].pack(PACK_CHAR)
@@ -693,11 +693,11 @@
def self.has_content?
false
end
# @return
- # [u'active = nil']
+ # ['active = nil']
def self.encode(channel, active)
buffer = @packed_indexes.dup
bit_buffer = 0
bit_buffer = bit_buffer | (1 << 0) if active
buffer << [bit_buffer].pack(PACK_CHAR)
@@ -739,11 +739,11 @@
def self.has_content?
false
end
# @return
- # [u'reply_code = nil', u'reply_text = EMPTY_STRING', u'class_id = nil', u'method_id = nil']
+ # ['reply_code = nil', 'reply_text = EMPTY_STRING', 'class_id = nil', 'method_id = nil']
def self.encode(channel, reply_code, reply_text, class_id, method_id)
buffer = @packed_indexes.dup
buffer << [reply_code].pack(PACK_UINT16)
buffer << reply_text.to_s.bytesize.chr
buffer << reply_text.to_s
@@ -800,11 +800,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'exchange = nil', u"type = u'direct'", u'passive = false', u'durable = false', u'auto_delete = false', u'internal = false', u'nowait = false', u'arguments = {}']
+ # ['ticket = 0', 'exchange = nil', "type = 'direct'", 'passive = false', 'durable = false', 'auto_delete = false', 'internal = false', 'nowait = false', 'arguments = {}']
def self.encode(channel, exchange, type, passive, durable, auto_delete, internal, nowait, arguments)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << exchange.to_s.bytesize.chr
@@ -856,11 +856,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'exchange = nil', u'if_unused = false', u'nowait = false']
+ # ['ticket = 0', 'exchange = nil', 'if_unused = false', 'nowait = false']
def self.encode(channel, exchange, if_unused, nowait)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << exchange.to_s.bytesize.chr
@@ -906,11 +906,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'destination = nil', u'source = nil', u'routing_key = EMPTY_STRING', u'nowait = false', u'arguments = {}']
+ # ['ticket = 0', 'destination = nil', 'source = nil', 'routing_key = EMPTY_STRING', 'nowait = false', 'arguments = {}']
def self.encode(channel, destination, source, routing_key, nowait, arguments)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << destination.to_s.bytesize.chr
@@ -960,11 +960,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'destination = nil', u'source = nil', u'routing_key = EMPTY_STRING', u'nowait = false', u'arguments = {}']
+ # ['ticket = 0', 'destination = nil', 'source = nil', 'routing_key = EMPTY_STRING', 'nowait = false', 'arguments = {}']
def self.encode(channel, destination, source, routing_key, nowait, arguments)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << destination.to_s.bytesize.chr
@@ -1022,11 +1022,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'queue = EMPTY_STRING', u'passive = false', u'durable = false', u'exclusive = false', u'auto_delete = false', u'nowait = false', u'arguments = {}']
+ # ['ticket = 0', 'queue = EMPTY_STRING', 'passive = false', 'durable = false', 'exclusive = false', 'auto_delete = false', 'nowait = false', 'arguments = {}']
def self.encode(channel, queue, passive, durable, exclusive, auto_delete, nowait, arguments)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << queue.to_s.bytesize.chr
@@ -1088,11 +1088,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'queue = EMPTY_STRING', u'exchange = nil', u'routing_key = EMPTY_STRING', u'nowait = false', u'arguments = {}']
+ # ['ticket = 0', 'queue = EMPTY_STRING', 'exchange = nil', 'routing_key = EMPTY_STRING', 'nowait = false', 'arguments = {}']
def self.encode(channel, queue, exchange, routing_key, nowait, arguments)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << queue.to_s.bytesize.chr
@@ -1142,11 +1142,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'queue = EMPTY_STRING', u'nowait = false']
+ # ['ticket = 0', 'queue = EMPTY_STRING', 'nowait = false']
def self.encode(channel, queue, nowait)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << queue.to_s.bytesize.chr
@@ -1195,11 +1195,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'queue = EMPTY_STRING', u'if_unused = false', u'if_empty = false', u'nowait = false']
+ # ['ticket = 0', 'queue = EMPTY_STRING', 'if_unused = false', 'if_empty = false', 'nowait = false']
def self.encode(channel, queue, if_unused, if_empty, nowait)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << queue.to_s.bytesize.chr
@@ -1250,11 +1250,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'queue = EMPTY_STRING', u'exchange = nil', u'routing_key = EMPTY_STRING', u'arguments = {}']
+ # ['ticket = 0', 'queue = EMPTY_STRING', 'exchange = nil', 'routing_key = EMPTY_STRING', 'arguments = {}']
def self.encode(channel, queue, exchange, routing_key, arguments)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << queue.to_s.bytesize.chr
@@ -1513,11 +1513,11 @@
when :octet
size = 1
result = data[offset, size].unpack(PACK_CHAR).first
when :timestamp
size = 8
- result = Time.at(data[offset, size].unpack(PACK_UINT32_X2).last)
+ result = Time.at(data[offset, size].unpack(PACK_UINT64_BE).last)
when :table
size = 4 + data[offset, 4].unpack(PACK_UINT32)[0]
result = Table.decode(data[offset, size])
end
properties[name] = result
@@ -1538,11 +1538,11 @@
def self.has_content?
false
end
# @return
- # [u'prefetch_size = false', u'prefetch_count = false', u'global = false']
+ # ['prefetch_size = false', 'prefetch_count = false', 'global = false']
def self.encode(channel, prefetch_size, prefetch_count, global)
buffer = @packed_indexes.dup
buffer << [prefetch_size].pack(PACK_UINT32)
buffer << [prefetch_count].pack(PACK_UINT16)
bit_buffer = 0
@@ -1585,11 +1585,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'queue = EMPTY_STRING', u'consumer_tag = EMPTY_STRING', u'no_local = false', u'no_ack = false', u'exclusive = false', u'nowait = false', u'arguments = {}']
+ # ['ticket = 0', 'queue = EMPTY_STRING', 'consumer_tag = EMPTY_STRING', 'no_local = false', 'no_ack = false', 'exclusive = false', 'nowait = false', 'arguments = {}']
def self.encode(channel, queue, consumer_tag, no_local, no_ack, exclusive, nowait, arguments)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << queue.to_s.bytesize.chr
@@ -1664,11 +1664,11 @@
def self.has_content?
false
end
# @return
- # [u'consumer_tag = nil', u'nowait = false']
+ # ['consumer_tag = nil', 'nowait = false']
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
@@ -1717,11 +1717,11 @@
def self.has_content?
true
end
# @return
- # [u'ticket = 0', u'exchange = EMPTY_STRING', u'routing_key = EMPTY_STRING', u'mandatory = false', u'immediate = false', 'user_headers = nil', 'payload = ""', 'frame_size = nil']
+ # ['ticket = 0', 'exchange = EMPTY_STRING', 'routing_key = EMPTY_STRING', 'mandatory = false', 'immediate = false', 'user_headers = nil', 'payload = ""', 'frame_size = nil']
def self.encode(channel, payload, user_headers, exchange, routing_key, mandatory, immediate, frame_size)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << exchange.to_s.bytesize.chr
@@ -1841,11 +1841,11 @@
def self.has_content?
false
end
# @return
- # [u'ticket = 0', u'queue = EMPTY_STRING', u'no_ack = false']
+ # ['ticket = 0', 'queue = EMPTY_STRING', 'no_ack = false']
def self.encode(channel, queue, no_ack)
ticket = 0
buffer = @packed_indexes.dup
buffer << [ticket].pack(PACK_UINT16)
buffer << queue.to_s.bytesize.chr
@@ -1955,11 +1955,11 @@
def self.has_content?
false
end
# @return
- # [u'delivery_tag = false', u'multiple = false']
+ # ['delivery_tag = false', 'multiple = false']
def self.encode(channel, delivery_tag, multiple)
buffer = @packed_indexes.dup
buffer << AMQ::Pack.pack_uint64_big_endian(delivery_tag)
bit_buffer = 0
bit_buffer = bit_buffer | (1 << 0) if multiple
@@ -1979,11 +1979,11 @@
def self.has_content?
false
end
# @return
- # [u'delivery_tag = nil', u'requeue = true']
+ # ['delivery_tag = nil', 'requeue = true']
def self.encode(channel, delivery_tag, requeue)
buffer = @packed_indexes.dup
buffer << AMQ::Pack.pack_uint64_big_endian(delivery_tag)
bit_buffer = 0
bit_buffer = bit_buffer | (1 << 0) if requeue
@@ -2003,11 +2003,11 @@
def self.has_content?
false
end
# @return
- # [u'requeue = false']
+ # ['requeue = false']
def self.encode(channel, requeue)
buffer = @packed_indexes.dup
bit_buffer = 0
bit_buffer = bit_buffer | (1 << 0) if requeue
buffer << [bit_buffer].pack(PACK_CHAR)
@@ -2026,11 +2026,11 @@
def self.has_content?
false
end
# @return
- # [u'requeue = false']
+ # ['requeue = false']
def self.encode(channel, requeue)
buffer = @packed_indexes.dup
bit_buffer = 0
bit_buffer = bit_buffer | (1 << 0) if requeue
buffer << [bit_buffer].pack(PACK_CHAR)
@@ -2089,11 +2089,11 @@
def self.has_content?
false
end
# @return
- # [u'delivery_tag = false', u'multiple = false', u'requeue = true']
+ # ['delivery_tag = false', 'multiple = false', 'requeue = true']
def self.encode(channel, delivery_tag, multiple, requeue)
buffer = @packed_indexes.dup
buffer << AMQ::Pack.pack_uint64_big_endian(delivery_tag)
bit_buffer = 0
bit_buffer = bit_buffer | (1 << 0) if multiple
@@ -2269,10 +2269,10 @@
def self.has_content?
false
end
# @return
- # [u'nowait = false']
+ # ['nowait = false']
def self.encode(channel, nowait)
buffer = @packed_indexes.dup
bit_buffer = 0
bit_buffer = bit_buffer | (1 << 0) if nowait
buffer << [bit_buffer].pack(PACK_CHAR)