Does this project also support the socket.io client?
Recently, I was trying to use import { io } from "https://cdn.socket.io/4.6.1/socket.io.esm.min.js"; in a deno project, but it didn't seem to work. Nothing was emitted. 🤔 Maybe this project implements a fixed version of the socket.io client? I couldn't find it in the repo, but I hope it's somewhere in here. Thanks much!
Hi! No, the JavaScript client is not compatible with Deno, but if there is enough interest we could totally implement it.
So, how connect from client with server?
I'm worried about that too...
people, it can be done with deno using the socket.io client
This code works:
import { io } from "https://cdn.socket.io/4.6.1/socket.io.esm.min.js";
const socket = io("http://localhost:8080/", {
transports: ["websocket"],
});
socket.on("connect", () => {
console.log(socket.id); // x8WIv7-mJelg7on_ALbx
});