欢迎使用CSDN-markdown编辑器

来源:互联网 发布:王健林要被清算了知乎 编辑:程序博客网 时间:2024/06/06 04:27

转自:https://toys.lerdorf.com/archives/57-ZeroMQ-+-libevent-in-PHP.html

While waiting for a connection in Frankfurt I had a quick look at what it would take to make ZeroMQ and libevent co-exist in PHP and it was actually quite easy. Well, easy after Mikko Koppanen added a way to get the underlying socket fd from the ZeroMQ PHP extension. To get this working, install the PHP ZeroMQ extension and the PHP libevent extension. First, a little event-driven server that listens on loopback port 5555 and waits for 10 messages and then exits.

Server.php

0 0
原创粉丝点击