You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
Need update wiki with worked examples, but the problem with websockets is more complex. and even this not help because core protocol of socket.io implemented wrong way. Ping\Pong also not working. The feeling that the implementation of web sockets in this package was abandoned on the half way.
Updated:
So, expirience way i found that this websocket implementation work only with socket.io-client version 2.
That what you need to do on the fronted side:
npm i socket.io-client@v2-latest
After that use this code for starting point:
import io from "socket.io-client";
const socket = io("ws://127.0.0.1:1215", {
// transports: ["websocket"], //if you want force ws: connection instead of initial http:
});
socket.on("connect", function (event) {
console.log(event);
});
function handleClick() {
socket.emit("hello", { text: "i say hey" });
}
I hope this help for anyone.
But anyway - wiki must be updated or laravel-swoole package must be updated to actual state.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Need update wiki with worked examples, but the problem with websockets is more complex. and even this not help because core protocol of socket.io implemented wrong way. Ping\Pong also not working. The feeling that the implementation of web sockets in this package was abandoned on the half way.
Updated:
So, expirience way i found that this websocket implementation work only with socket.io-client version 2.
That what you need to do on the fronted side:
npm i socket.io-client@v2-latest
After that use this code for starting point:
I hope this help for anyone.
But anyway - wiki must be updated or laravel-swoole package must be updated to actual state.
The text was updated successfully, but these errors were encountered: