国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

使用redis異步訂閱,出現(xiàn)的問題,求大佬指點

liji666

報錯是這樣的

2019-07-03 16:20:53 pid:25979 Worker process terminated with ERROR: E_COMPILE_ERROR "Declaration of Workerman\Events\React\Base::cancelTimer(React\EventLoop\TimerInterface $timer) must be compatible with React\EventLoop\LoopInterface::cancelTimer(React\EventLoop\Timer\TimerInterface $timer) in /www/wwwroot/ws.hq.dyhjw.com2/vendor/workerman/workerman/Events/React/Base.php on line 22"
2019-07-03 16:20:53 pid:27591 worker exit with status 65280

服務(wù)端代碼如下:

// 當$sender_io啟動后監(jiān)聽一個http端口,通過這個端口可以給任意uid或者所有uid推送數(shù)據(jù)
$sender_io->on('workerStart', function(){
    global $factory;
    $loop    = Worker::getEventLoop();
    $factory = new Factory($loop);
    $factory->createClient('localhost:6379')->then(function (Client $client) {
        $client->auth('123456');
        $client->subscribe('quotes')->then(function () {
            echo 'Now subscribed to channel ';
        });
        $client->on('message', function ($event_name, $message) {
            global $sender_io, $uidConnectionMap;
            if ($uidConnectionMap) {
                $value = json_decode($message, true);
                $data = ;
                // 在編碼數(shù)組里,就進行發(fā)送
                $code = $data;
                if($code){
                //$sender_io->emit('data', $data);
                    $sender = $sender_io->to($code);
                    if($sender){
                        $sender->emit('data', $data);
                    }
                }
            }
        });
    });
});
4201 1 0
1個回答

walkor 打賞

recat/redis項目已經(jīng)過期了,不要再使用了

  • liji666 2019-07-03

    好的,謝謝,那我這邊應(yīng)該用什么做替換合適呢

年代過于久遠,無法發(fā)表回答
??