I trying to implement socket connection in my laravel5.1 web application My web app running in docker containers.
I have setup laravel-echo-server using [kylestev/laravel-echo-server][1]
, and its running as expected
import Echo from "laravel-echo"
window.io = require('socket.io-client');
if (typeof io !== 'undefined') {
window.Echo = new Echo({
broadcaster: 'socket.io',
host: window.location.hostname + ':6001',
});
}
window.Echo.channel('test-event')
.listen('Eventname', (e) => {
console.log(e);
});
when i load the page in browser the polling request failing with EMPTY_RESPONSE error.
{
"authHost": null,
"authEndpoint": null,
"database": "redis",
"databaseConfig": {
"redis": {
"port": "6379",
"host": "redis"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": "hms.zuzurooms.local",
"port": "6001",
"protocol": "http",
"socketio": {},
"sslCertPath": "",
"sslKeyPath": "",
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "",
"allowMethods": "",
"allowHeaders": ""
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire