Tuesday, 22 June 2021

How to connect multiple sockets in a single vuejs project?

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.



from How to connect multiple sockets in a single vuejs project?

No comments:

Post a Comment