0

I installed a new Laravel application after the description https://medium.com/@dennissmink/laravel-echo-server-how-to-24d5778ece8b

I did after i tried to install socket.io in an current application. In both cases there is the problem that the socket.io turns without any results.

vagrant@homestead:~/code/test$ laravel-echo-server start

L A R A V E L E C H O S E R V E R

version 1.5.0

⚠ Starting server in DEV mode...

✔ Running at localhost on port 6001 ✔ Channels are ready. ✔ Listening for http events... ✔ Listening for redis events...

Server ready!

Channel: test-event Event: App\Events\ExampleEvent Channel: test-event Event: App\Events\ExampleEvent

            window.Echo.channel('test-event')
                .listen('ExampleEvent', (e) => {
                    alert(e)
                    console.log(e);
                });

What is missing that the socket.io does not get any results? Any hint?

Peter
  • 655
  • 1
  • 14
  • 37
  • i think you forgot to make the ExampleEvent implements ShouldBroadcast interface in the server – Ahmed Aboud Apr 30 '19 at 06:39
  • Should Broadcast is implemented – Peter Apr 30 '19 at 07:09
  • I tested with another github project. there is the following error: `app.js:38876 WebSocket connection to 'wss://test.local:6001/app/websocketkey?protocol=7&client=js&version=4.3.1&flash=false' failed: WebSocket is closed before the connection is established.` – Peter Apr 30 '19 at 07:50
  • https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon check this – Ahmed Aboud Apr 30 '19 at 08:51

0 Answers0