Registry / networking / react-zmq

react-zmq

JSON →
library0.4.0phppackagistunverified

ZeroMQ bindings for React provides asynchronous ZeroMQ socket integration for ReactPHP.

composer require react/zmq
INSTALL
IMPORT
SIG · REACT-ZMQ
R
react-zmq
networkingphpv0.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Context
use React\ZMQ\Context;

Create a ZMQ pull socket and listen for messages asynchronously.

use React\ZMQ\Context; use React\EventLoop\Factory; $loop = Factory::create(); $context = new Context($loop); $pull = $context->getSocket(ZMQ::SOCKET_PULL); $pull->bind('tcp://127.0.0.1:5555'); $pull->on('message', function ($msg) { echo "Received: $msg\n"; }); $loop->run();
Debug
Known issues
breakingRequires the zmq PHP extension to be installed.
fix
Install the zmq extension via pecl install zmq or enable it in php.ini.
affects: >=0.4.0
Upgrade
Version history
0.4.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
26
Resources
react-zmq — pip install react-zmq · libregistry