略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: ZMQDevice::__construct

2024-12-22

ZMQDevice::__construct

(PECL zmq >= 0.5.0)

ZMQDevice::__constructConstruct a new device

说明

public ZMQDevice::__construct(ZMQSocket $frontend, ZMQSocket $backend, ZMQSocket $listener = ?)

"ØMQ devices can do intermediation of addresses, services, queues, or any other abstraction you care to define above the message and socket layers." -- zguide

参数

frontend

Frontend parameter for the devices. Usually where there messages are coming.

backend

Backend parameter for the devices. Usually where there messages going to.

listener

Listener socket, which receives a copy of all messages going both directions. The type of this socket should be SUB, PULL or DEALER.

返回值

Call to this method will prepare the device. Usually devices are very long running processes so running this method from interactive script is not recommended. This method throw ZMQDeviceException if the device cannot be started.

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/zmqdevice.construct.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3