创建webscoket出错

zfs123456
stream_socket_pair(): //出错了
     */
    protected $channel = array();

    /**
     * Construct.
     */
    public function __construct()
    {
        // Create a pipeline and put into the collection of the read to read the descriptor to avoid empty polling.
        $this->channel = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP);
        if ($this->channel) {
            stream_set_blocking($this->channel, 0);
            $this->_readFds = $this->channel;
        }
        // Init SplPriorityQueue.
        $this->_scheduler = new \SplPriorityQueue();
        $this->_scheduler->setExtractFlags(\SplPriorityQueue::EXTR_BOTH);
    }
2386 1 0
1个回答

walkor 打赏

看下是不是版本搞错了
Linux版本Workerman只能在linux下运行。
Windows版本Workerman只能在windows下运行。

  • 暂无评论
年代过于久远,无法发表回答
×
🔝