From ffbb3043db16d9b6c9864ebb31e596c705925128 Mon Sep 17 00:00:00 2001 From: F0Rt04ka Date: Thu, 1 Jun 2023 18:08:24 +0700 Subject: [PATCH] Add bytes type of AMQP field --- src/Bunny/Constants.php | 2 ++ src/Bunny/Protocol/ProtocolReader.php | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Bunny/Constants.php b/src/Bunny/Constants.php index 0642339..f3828a0 100644 --- a/src/Bunny/Constants.php +++ b/src/Bunny/Constants.php @@ -251,4 +251,6 @@ final class Constants const FIELD_NULL = 0x56; // 'V' + const FIELD_BYTES = 0x78; // 'x' + } diff --git a/src/Bunny/Protocol/ProtocolReader.php b/src/Bunny/Protocol/ProtocolReader.php index 127280e..c7f629f 100644 --- a/src/Bunny/Protocol/ProtocolReader.php +++ b/src/Bunny/Protocol/ProtocolReader.php @@ -262,6 +262,7 @@ public function consumeFieldValue(Buffer $buffer) case Constants::FIELD_SHORT_STRING: return $buffer->consume($buffer->consumeUint8()); case Constants::FIELD_LONG_STRING: + case Constants::FIELD_BYTES: return $buffer->consume($buffer->consumeUint32()); case Constants::FIELD_ARRAY: return $this->consumeArray($buffer);