Answer the question
In order to leave comments, you need to log in
How to send data from the client in Ratchet push?
Good day!
There is a project in laravel.
I drove in the code on the server side according to the socketo.me/docs/push manual
The client connects, the data is sent using php.
The example does not describe the publish method (for reasons I do not understand).
When connecting ab.session, I write publish to the click event for the button, then in the Pusher.php file I write a call to $this->onBlogEntry($entry) in onPublish.
The code is working, I just want to know if it's right to do everything through events, it's rather weak on this topic. Googled nothing
Answer the question
In order to leave comments, you need to log in
As a result, I took the logic from the first solution with MessageComponentInterface and sketched analogies in the WampServerInterface version. Everything seems to be smooth
Try Laravel's simple Ratchet integration package https://github.com/TheOrchid/Socket
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question