Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this project also support the socket.io client? #12

Open
fucksophie opened this issue Feb 24, 2023 · 4 comments
Open

Does this project also support the socket.io client? #12

fucksophie opened this issue Feb 24, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@fucksophie
Copy link

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!

@fucksophie fucksophie added the enhancement New feature or request label Feb 24, 2023
@darrachequesne
Copy link
Member

Hi! No, the JavaScript client is not compatible with Deno, but if there is enough interest we could totally implement it.

@sonickseven
Copy link

So, how connect from client with server?

@nakasyou
Copy link

nakasyou commented Jun 9, 2023

I'm worried about that too...

@RomanFama592
Copy link

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
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants