php - Does laravel5.4's broadcast system need to set up its own websocket?
PHP中文网
PHP中文网 2017-06-26 10:48:59
0
1
799

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?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
刘奇

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template