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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect multiple sockets in a single vuejs project? #310

Open
allenshaji opened this issue Jun 6, 2021 · 7 comments
Open

How to connect multiple sockets in a single vuejs project? #310

allenshaji opened this issue Jun 6, 2021 · 7 comments

Comments

@allenshaji
Copy link

import VueSocketIOExt from 'vue-socket.io-extended';
import { io } from 'socket.io-client';

const socket = io('http://localhost:3200/');
const socket1 = io('http://localhost:3100/');

Vue.use(VueSocketIOExt, socket);
Vue.use(VueSocketIOExt, socket1);

I tried using the above code. But only only socket is working. Is it possible to connect both the sockets simultaneously. Thanks for the help in advance

@JAGFx
Copy link

JAGFx commented Jun 21, 2021

I'm looking for the same feature.

@ssyrota
Copy link

ssyrota commented Jul 14, 2021

+, it's a problem

@1shaked
Copy link

1shaked commented Aug 14, 2021

1+

@Thabet-Do
Copy link

@AryaCherryLiu
Copy link

I also faced this problem.+1

@JAGFx
Copy link

JAGFx commented Oct 23, 2021

After many search,, the only solution it's to use a SocketIO and a store

This project is no longer useful, and I've a better control on the data sent through the app.

See an example here

@ImnotLiAng
Copy link

https://github.com/aripjanovsh/Vue-Socket.io
This could help solve the problem

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

No branches or pull requests

7 participants