Questions tagged [vue-socket.io]
17 questions
5
votes
1 answer
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,…

coder
- 614
- 3
- 12
- 33
5
votes
1 answer
vue-socket.io app not receiving emit from express socket.io app
I am trying to create a socket.io communication between an express app using socket.io (localhost:8000) and a vue app using vue-socket.io (localhost:8080). The express app is receiving emissions from the vue app but not vice versa. Here is my…

qin
- 61
- 8
3
votes
0 answers
How to connect to multiple websocket servers with vue-socket.io-extended
I have 2 servers A and B. Each running on a different port. How do I connect to both servers in Vuejs using vue-socket.io-extended?
What I have tried so far is:
import store from './store'
import VueSocketIOExt from 'vue-socket.io-extended'
import…

chen7david
- 109
- 2
- 9
3
votes
0 answers
Dynamically inject or update a Vue dependency
I am building an application in Vue with socket connections.
The app allows the user to view the content as an authenticated user and as anonymous.
After logging in, the idea is to be able to target specific clients with data - eg "someone…
user1037355
1
vote
0 answers
Socket.io Server Listening in Vue Components
I have a socket.io server :
const http = require('http').createServer();
const io = require('socket.io')(http, {
cors: { origin: "*" }
});
io.on('connection', (socket) => {
console.log('a user connected');
…

sssss_sssss
- 161
- 2
- 14
1
vote
1 answer
Socket.io not working when using multiple nodes through pm2
I have NodeJS application running with Socket.io for real-time updates. I am using PM2 process manager for production Node.js application. Now I want to use cluster mode in PM2.
As nodejs applications runs in single process, I want to utilize max…

Prem popatia
- 321
- 3
- 14
1
vote
2 answers
Vuejs not firing code when receiving message from socket.io server
I've been working on allowing a vuejs app talk to a remote, standalone socket.io server. I've managed to get the vuejs app to send messages to the socket.io server (confirmed through console logs on the nodejs instance), and I appear to be getting…

David
- 16,246
- 34
- 103
- 162
0
votes
0 answers
Nuxt.js + socket.io works locally but not after uploading to server
I'm building a chat app using socket.io: 2.0.2, nuxt: 2, vue-socket.io: 3.0.10.
The app works fine locally, but socket.ui stops responding after uploading to the server. How can this problem be solved?
server:
const io = require('socket.io')(3001,…

i-akmalov
- 11
- 3
0
votes
0 answers
how to emit events in vue socket io
im building a chat application with socket io and i'm trying to log the event as soon as the user open the frontend please how can i do it
this is my script tag
sockets: {
connect: function(){
console.log('socket connected')
},
…

jibzy
- 539
- 2
- 11
0
votes
1 answer
Unable to connect to socket.io server over local network
I am trying to set up communication between my nodeJS server and a vueJS app via socket.io. I have been able to get the socket communication working on my main computer so far. When running my node server and my vue app in dev mode, I can open the…

whoMe
- 227
- 2
- 13
0
votes
1 answer
Vue SocketIO connexion from remote host to local hostname (http://myhostname.local)
I'm trying to exchange data through WS between a local raspberry and a webapp hosted on a remote server.
Vue.use(
new VueSocketIO({
debug: true,
connection: io('http://myhostname.local:5000', {
transports: ["websocket", "polling",…

mchev
- 713
- 1
- 8
- 22
0
votes
1 answer
How to connect socket from VueJs with Sails js built in socket with sails.io.js in vue js?
I am trying to connect VueJs with Sails js over socket connection through Sails.io.js package but got not success till now.
I have taken VuejS starter template and sails js starter template to make this whole thing work.
My Frontend packages…

Prem popatia
- 321
- 3
- 14
0
votes
0 answers
vue-socketio and flask-socketio
I am using vue-socketio (v3.0.5) to communicate with a flask server running flask-socketio (v4.3.1). My web client can connect, but does not stay connected for long. No messaging is exchanged beyond the initial handshake. I am running the…

blackirishman
- 903
- 1
- 10
- 23
0
votes
2 answers
How to leave a socket room with vue-socket and rejoin without duplicate messages?
When I join the room, and then leave the route and go back, and then use the chat I've built, I get double messages of * amount of messages as many times I left and rejoined.
This problem goes away when I hard refresh.
I've tried everything I could…

danefondo
- 525
- 7
- 15
0
votes
1 answer
VueSocketIO offer fallback connection url
I am using Vuetify together with Vuex and VueSocketIO for my WebApp and here is an example Part of the code:
Vue.use(new VueSocketIO({
reconnection: true,
debug: true,
connection: SocketIO(`http://${process.env.ip}:4000`),
…

NotARobot
- 455
- 2
- 10
- 27