![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/ |
<?php namespace PhpAmqpLib\Channel; use PhpAmqpLib\Wire\AMQPReader; /** * @link https://livebook.manning.com/book/rabbitmq-in-depth/chapter-2/v-13/22 * @link https://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf 4.2.6 Content Framing */ final class Frame { public const FRAME_HEADER_SIZE = AMQPReader::OCTET + AMQPReader::SHORT + AMQPReader::LONG; public const END = 0xCE; public const TYPE_METHOD = 1; public const TYPE_HEADER = 2; public const TYPE_BODY = 3; public const TYPE_HEARTBEAT = 8; /** @var int */ private $type; /** @var int */ private $channel; /** @var int */ private $size; /** @var string|null */ private $payload; public function __construct(int $type, int $channel, int $size, ?string $payload = null) { $this->type = $type; $this->channel = $channel; $this->size = $size; $this->payload = $payload; } /** * @return int */ public function getType(): int { return $this->type; } /** * @return int */ public function getChannel(): int { return $this->channel; } /** * @return int */ public function getSize(): int { return $this->size; } public function getPayload(): ?string { return $this->payload; } public function isMethod(): bool { return $this->type === self::TYPE_METHOD; } public function isHeartbeat(): bool { return $this->type === self::TYPE_HEARTBEAT; } }