更多>
最新下载
24小时阅读排行榜
- 1 mysql时区错误怎么办_时间异常修复
- 2 mysql安装过程中解决依赖问题与配置方法
- 3 css 盒模型 子元素 margin 影响父元素怎么办_通过建立新的块级上下文解决
- 4 Go语言整型与浮点型如何区分_Golang数值类型使用说明
- 5 mysql初级项目实战适合新手学习吗_mysql学习价值说明
- 6 php怎样判断变量为颜色值字符串_php颜色值串判断法【示例】
- 7 如何在 Go 应用中集成 Azure AD 实现单点登录(SSO)
- 8 实现两级联动下拉菜单并确保表单能同时提交分类ID与子分类ID
- 9 如何让图片在容器内自适应尺寸并保持宽高比
- 10 如何安全删除 Go 切片中的元素:避免 append 导致原切片意外修改
- 11 PHP 中如何正确验证 XML 解析后的整数输入
- 12 如何从URL哈希值中提取参数并动态显示在HTML标签内
- 13 如何准确计算用户年龄:JavaScript 日期差值的正确处理方法
- 14 如何在 PHP for 循环中正确累加变量值
- 15 如何从 HTML 响应中提取特定元素的值并保存到变量
更多>
最新教程
-
- Node.js 教程
- 16454 2025-08-28
-
- CSS3 教程
- 1547288 2025-08-27
-
- Rust 教程
- 23549 2025-08-27
-
- Vue 教程
- 25951 2025-08-22
-
- PostgreSQL 教程
- 22460 2025-08-21
-
- Git 教程
- 9373 2025-08-21
下载首页 / 类库下载 / 其它类库
AMQP,即Advanced Message Queuing Protocol,一个提供统一消息服务的应用层标准高级消息队列协议,是应用层协议的一个开放标准,为面向消息的中间件设计。基于此协议的客户端与消息中间件可传递消息,并不受客户端/中间件不同产品,不同的开发语言等条件的限制。Erlang中的实现有 RabbitMQ等。
abstract class AbstractChannel
{
const PROTOCOL_080 = '0.8';
const PROTOCOL_091 = '0.9.1';
public static $PROTOCOL_CONSTANTS_CLASS;
public function __construct(AbstractConnection $connection, $channel_id)
{
$this->connection = $connection;
$this->channel_id = $channel_id;
$connection->channels[$channel_id] = $this;
$this->frame_queue = array(); // Lower level queue for frames
$this->method_queue = array(); // Higher level queue for methods
$this->auto_decode = false;
$this->msg_property_reader = new AMQPReader(null);
$this->wait_content_reader = new AMQPReader(null);
$this->dispatch_reader = new AMQPReader(null);
$this->protocolVersion = self::getProtocolVersion();
switch ($this->protocolVersion) {
case self::PROTOCOL_091:
self::$PROTOCOL_CONSTANTS_CLASS = 'PhpAmqpLib\Wire\Constants091';
$c = self::$PROTOCOL_CONSTANTS_CLASS;
$this->debug = new DebugHelper($c);
$this->amqp_protocol_header = $c::$AMQP_PROTOCOL_HEADER;
$this->protocolWriter = new Protocol091();
$this->waitHelper = new Wait091();
$this->methodMap = new MethodMap091();
break;
case self::PROTOCOL_080:
self::$PROTOCOL_CONSTANTS_CLASS = 'PhpAmqpLib\Wire\Constants080';
$c = self::$PROTOCOL_CONSTANTS_CLASS;
$this->debug = new DebugHelper($c);
$this->amqp_protocol_header = $c::$AMQP_PROTOCOL_HEADER;
$this->protocolWriter = new Protocol080();
$this->waitHelper = new Wait080();
$this->methodMap = new MethodMap080();
break;
default:
throw new AMQPRuntimeException(sprintf(
'Protocol: %s not implemented.',
$this->protocolVersion
));
}
}
本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:admin@php.cn
