Answer the question
In order to leave comments, you need to log in
How to implement ratchet websocket push?
I tried to remake and run a websocket push on yii2 following the example from this video https://www.youtube.com/watch?v=wXCORk5xXPs&t=139s..
An example code can be seen here:
https://github.com/3u3ik/cp lucky-wifi.ru/blob/fa4...
https://github.com/3u3ik/cp.lucky-wifi.ru/blob/fa4...
https://github.com/3u3ik/cp.lucky- wifi.ru/blob/fa4...
The essence of the problem is that if you register everything as in the example, an error occurs when starting the server.
Argument 2 passed to React\Socket\Server::__construct() must implement interface React\EventLoop\LoopInterface, none given.
public function __construct()
{
parent::__construct($this->id, $this->module);
}
PHP Fatal Error 'yii\base\ErrorException' with message 'Call to a member function getUniqueId() on null'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question