duanchoupo1104 2016-02-25 22:21
浏览 63

棘轮推送教程错误不能代表ZMQ_FD类型的流

I'm trying to run Ratchet tutorial application on my localhost. I followed this tutorial http://socketo.me/docs/push , but on the last step I got this error, after I ran my push server (bin /push_server.php)

Warning: stream_select(): cannot represent a stream of type ZMQ_FD as a select()
able descriptor in C:\wamp\wwwatchet_podla_tutorialu\vendoreact\event-loop\S
treamSelectLoop.php on line 255

Call Stack:
    0.0010     236728   1. {main}() C:\wamp\wwwatchet_podla_tutorialu\bin\push
_server.php:0
    0.1950    1230808   2. React\EventLoop\StreamSelectLoop->run() C:\wamp\www
atchet_podla_tutorialu\bin\push_server.php:27
    0.1950    1231800   3. React\EventLoop\StreamSelectLoop->waitForStreamActivi
ty() C:\wamp\wwwatchet_podla_tutorialu\vendoreact\event-loop\StreamSelectLoo
p.php:201
    0.1950    1232352   4. React\EventLoop\StreamSelectLoop->streamSelect() C:\w
amp\wwwatchet_podla_tutorialu\vendoreact\event-loop\StreamSelectLoop.php:221

    0.1950    1232496   5. stream_select() C:\wamp\wwwatchet_podla_tutorialu\v
endoreact\event-loop\StreamSelectLoop.php:255

This is my push_server.php file:

<?php
    require dirname(__DIR__) . '/vendor/autoload.php';

    $loop   = React\EventLoop\Factory::create();
    $pusher = new MyApp\Pusher;

    // Listen for the web server to make a ZeroMQ push after an ajax request
    $context = new React\ZMQ\Context($loop);
    $pull = $context->getSocket(ZMQ::SOCKET_PULL);
    $pull->bind('tcp://127.0.0.1:5555'); // Binding to 127.0.0.1 means the only client that can connect is itself
    $pull->on('message', array($pusher, 'onBlogEntry'));

    // Set up our WebSocket server for clients wanting real-time updates
    $webSock = new React\Socket\Server($loop);
    $webSock->listen(8080, '0.0.0.0'); // Binding to 0.0.0.0 means remotes can connect
    $webServer = new Ratchet\Server\IoServer(
        new Ratchet\Http\HttpServer(
            new Ratchet\WebSocket\WsServer(
                new Ratchet\Wamp\WampServer(
                    $pusher
                )
            )
        ),
        $webSock
    );

    $loop->run();

I'm running WampServer x 64 on Windows 7 x 64.

I found here an older post, where guy had probably the same problem as me and he fixed it by installing WampServer x32 version. I would like to avoid this solution. Does anybody know how to fix it?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 AT89C51控制8位八段数码管显示时钟。
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题