Answer the question
In order to leave comments, you need to log in
What is the correct way to open a listening port through ReactPHP?
Trying to make an app using ReactPHP/Sosket? so that it can just receive and send messages.
Everything works on local, but when transferring to Yandex, the cloud can’t figure out how to open the port correctly so that it is accessible from the outside.
It seems that I tried all the instructions: first on ubuntu, now I switched to centos 7 (I thought it would be easier, but no).
In the connection settings, I specify my external ip and port:
$loop = React\EventLoop\Factory::create();
$server = new React\Socket\Server("1.2.3.4:4321", $loop);
$server = new React\Socket\LimitingServer($server, null);
Fatal error: Uncaught RuntimeException: Failed to listen on "tcp://1.2.3.4:4321": Cannot assign requested address in /path/to/dir/vendor/react/socket/src/TcpServer.php:164
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