Why do we need products like Pusher and Socket.io to establish a connection to the web connector?

I recently read about websites and SaaS like Pusher and Socket.io while working on my Laravel chat application. I don’t understand why we need to use external software to establish a network connection? Can server code like Laravel directly establish a connection to an interface like Vue.js? Why should it go through an intermediary like Pusher and Socket.io? Sorry for the noob question.

+6
source share
2 answers

It's not obligatory.

Websocket.

, Laravel - . , , , , .

, - :

  • -
  • Websocket

, Laravel , Websockets, , Laravel Websocket. , . PHP Websocket - , - , .

Laravel Pub/Sub, Redis , Redis Predis. , , , Laravel websocket .

, Laravel Websocket , Websocket , .

Pusher, , Websocket Laravel, Laravel Echo Server.

- Socket.io Redis , - Laravel. , , .

, , , Websocket , ..

PM2, .

Laravel , Web-, websocket. ; Laravel , , Service Provider, .

+9

? . , - .

.

Laravel? PHP.

Vue? javascript.

, . , , , , , , , , .

, . , . , .

Pusher, , , SaaS. Socket.io - .

+4

All Articles