M
M
Max2016-11-27 11:14:42
Yii
Max, 2016-11-27 11:14:42

How to connect Yii2 + WebSocket?

Hi all. I have a question, how can I connect websockets and Yii2? By googling, I found quite primitive examples (simple chats without authorization). Interested in something more complex. For example, the user is authorized on the site and when sending each message to the socket handler, you need to understand what kind of user it is. Does anyone have examples or does anyone know how to use the framework itself inside a WebSocket handler?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2016-11-28
@qonand

move towards the question "How to implement a websocket server in php", not how to do it in Yii. You need to understand that Yii is just a framework for php applications, so figure out how to do everything in pure php, and then, if necessary, connect Yii

M
Maxim Timofeev, 2016-11-27
@webinar

Я тоже искал, готового ничего нет. Связать думаю проще через консольный контроллер в yii. Все собираюсь попробовать эту связку, но все нет времени.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question