2
I am starting now with websocket, I have developed a chat in Realtime using the Ratchet library, I would like if there is any way to initialize the websocket without running command from the terminal.
I saw in the documentation the command:
<?php
$app = new Ratchet\App('localhost', 8080);
$app->route('/chat', new MyChat);
$app->route('/echo', new Ratchet\Server\EchoServer, array('*'));
$app->run();
I wanted the websocket running only when running the chat route, because I don’t think I would have to run it all the time. I’m sorry if I’m talking nonsense, but I don’t know much about websocket
– Victor Rajesh
They are two services running independently and interacting via http. Imagine that they are two servers on your machine. One is apache or ngnix for the web server that runs as a service. The webserver is running, whether you are using it or not. With the websocket is the same logic when running under the supervisor
– gmsantos
Got it @gmsantos, liked the suggestion
– Victor Rajesh