Yii2 and SSL socket connection to a server

Hello, this is a big question for me, but I don’t exactly where to start with.

I need to make a connection to a server via a SSL socket from a Yii2 application.

I slightly understand how to make a connection with PHP, but I have no idea how to keep the connection open (like a running daemon or background thread) with Yii2, without killing the connection when the user left the page.

I want to be able to push notifications on the webpage when event append.

How to communicate with the thread of daemon with a Yii2 web page (send data or display data on the webpage).

Any help welcome.





             Ydakilux.

You have to implement your own socket server which you can start as a daemon. That has nothing to do with web server. It has to work by itself starting as console script.