Merhaba, websocket ile bağlantı kurmak istiyorum api tarafında ilgili method illegal offset type hatası veriyor.
Consoledaki Hata
websocket.js:39 WebSocket connection to 'ws://localhost:4444/socket.io/?EIO=4&transport=websocket' failed:
React İlgili Kod
connectSocket = () => {
this.socket = SocketIO("http://localhost:4444", {transports: ['websocket', 'polling', 'flashsocket']});
this.socket.on("send_message", (data) => {
this.messageRender();
});
}
Controller Tarafı :
https://paste.laravel.io/a1d7ceb2-5eb8-4e50-a1f7-3ccb91c60a32
stackoverflow da ws://localhost yazıldığını gördüm ama 4444 portu açık değil bununla ilgisi olabilir mi bilmiyorum.
ws:// kısmını http:// yazınca da olmuyor.
import SocketIO from 'socket.io-client'; react tarafında import ettim.