Looking at the documentation, I found that there is a pusher redis driver. Are these just auxiliary websocket? If I want to use the broadcast function, do I need to set up websocket related things myself?
怪我咯2017-06-26 10:50:59
http://laravelacademy.org/pos...
The document mentions 3 types of driversPusher
Redis
Socket.IO
Among them, Pusher is a third-party service. Generally not considered
Redis, as the name suggests, pushes messages to redis. Then you need to write another program to sub subscribe to redis messages. and sent to the client. This basically amounts to doing nothing. . .
So generally we use the Socket.IO driver. As we all know, if the client wants to establish a websocket connection to the server, the server must have a long-running process to accept the connection.
The tlaverdure/laravel-echo-server mentioned in the document is such a process. The browser actually establishes a connection to it. Then your PHP program pushes the message to this process, and this process sends it to the browser for you.
end.