Currently I'm trying to integrate Swoole websocket server to existing chat application for the purpose of sending notifications to online users. Can't find examples of calling Swoole\WebSocket\Server->push from php files other than one that starts the server.
It is advised here https://stackoverflow.com/questions/49226659/swoole-with-rabbitmq to establish a server-side websocket connection to Swoole server to inform it about new event via a regular websocket message. Is it the only way to achieve websocket server from other server functions?
Currently I'm trying to integrate Swoole websocket server to existing chat application for the purpose of sending notifications to online users. Can't find examples of calling Swoole\WebSocket\Server->push from php files other than one that starts the server. It is advised here https://stackoverflow.com/questions/49226659/swoole-with-rabbitmq to establish a server-side websocket connection to Swoole server to inform it about new event via a regular websocket message. Is it the only way to achieve websocket server from other server functions?