I try to connect to two different web-socket Servers from a VUE-Client with vue-socket.io like this:
import { store } from '@/store/store'
import { store2 } from '@/store/store2'
Vue.use(Vuex)
Vue.use(VueSocketio, 'http://192.168.1.101:8000', store)
Vue.use(VueSocketio, 'http://192.168.1.102:8001', store2)
I have created 2 store files store.js
and store2.js
Actually the first Vue.use(VueSocketio…
line will connect and work properly, but the second will not. So in the upper example Port 8000
connects but not Port 8001
. When I swap the two lines Port 8001
will connect but Port 8000
will not.
All Examples I found deal only with one Web-socket Server and that works fine. What is the best practice to connect to multiple Web-socket Servers with a VUE-Client?
Any idea how I get both connected?