I'm building an application which needs to emit messages back to the server. I'm using Laravel
along with predis
to handle server-side events.
Is it possible for socket.io
to emit events which I can then listen for with predis
?
Something like this on the client side:
io.emit('testChannel:someEvent', { dataOne: 'data', dataTwo: 'data' });
Then behind the scenes with Laravel
:
public function listen()
{
Redis::subscribe(['testChannel'], function($message) {
dd($message);
});
}
I wish I could provide more information, but I'm mightily confused by the entire process.
Thanks in advance.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire