socket.io Questions
13
Solved
I'm working with socket.io and node.js and until now it seems pretty good, but I don't know how to send a message from the server to an specific client, something like this:
client.send(message, r...
Downpipe asked 10/1, 2011 at 13:29
7
Solved
I am trying to make a real time application. I am using NodeJS as a server and Socket.IO, to achieve my real time functionality.
The problem is I am getting error as:
WebSocket connection to 'ws...
Celina asked 20/4, 2017 at 17:55
5
Solved
I am using the default passport jwt AuthGuard for my project. That works for my post & get routes fine when setting the authentication header.
Now I want to use Nestjs Gateways as well with soc...
5
I have a Node.js script that uses websockets (socket.io). The script is running on my computer (e.g. local server environment) and I also tests through a browsers on my computer. I am trying to gra...
Tear asked 18/6, 2015 at 10:28
2
Solved
I have a node server running a react application, integrated with Socket.io. All works fine. I also have an external application that uses the same data. What I want to do is, when the data changes...
Degroot asked 27/6, 2017 at 9:12
6
Solved
I'm using Socket.io, and I'd like to know the status of connection to the server from the client-side.
Something like this:
socket.status // return true if connected, false otherwise
I need thi...
9
I'm trying to set a http header when socket.io client makes the connection request. Is there a way to do this?
Here is what i'm doing:
// server side
var io = socketio(server);
io.use(function (...
2
In my Socket.Io / Node.Js / Express app - before I added chat room – I used to emit events like this for everyone (including the sender):
io.emit('chat message', msg);
Now I added rooms and try to...
Atlantean asked 17/4, 2015 at 17:36
7
I'm trying to serve static files by nginx 1.6 and to proxy socket traffic coming from Node.js web server with socket.io .
This is the relevant part of nginx.conf:
location /socket.io/ {
proxy_p...
5
Solved
I'm new to nodejs and trying to write a chat room as so many people have.
The chat consists of multiple rooms and clients. Commands such as /nick /join /help /ls users /ls rooms work as you would e...
Amenable asked 28/6, 2014 at 4:1
3
Solved
I used
const my_socket = io.sockets.connected['YnwlYH-gCKT2K9jEAAAu'];
a lot.
https://mcmap.net/q/799701/-socket-io-disconnect-client-by-id
Is it broken in 3.X and 4.0.1?
$ npm list socket.io
[ema...
2
Solved
Is there a way to get the socket of a request inside of an express middleware?
ie:
import express from 'express';
import io from 'socket.io';
const app = express();
// combine app and io someho...
Aphyllous asked 21/2, 2017 at 23:28
3
Solved
I want to create a client-side function that can receive and execute arbitrary commands using client-side variables. I will be sending these functions from my server by using socket.io to send a JS...
Malorie asked 13/2, 2013 at 23:30
2
Whenever a client connects, I assign an id to that client using socket.id, and maintain it in the server for future reference. The problem I'm having right now is with disconnect/reconnect. I'm not...
8
Solved
I am investigating nodejs/socket.io for real time chat, and I need some advice for implementing rooms.
Which is better, using namespace or using the room feature to completely isolate grops of cha...
2
I'd like to use Socket.IO with my Nuxt 3 app, so that the Nuxt app and the Socket.IO server share the same port and the Socket.IO server automatically starts as soon as the Nuxt app is ready.
I've ...
Fairspoken asked 9/4, 2023 at 12:25
22
Solved
I am trying to integrate Socket.io with Angular and I'm having difficulties making a connection from the client-side to the server. I've looked through other related questions but my issue is happe...
Griz asked 29/12, 2016 at 14:16
9
Solved
I am writing an android app that needs to connect to a Socket.IO instance running on a node.js server.
Attempting to connect to the instance and transmitting data using an iOS device works flawles...
4
Solved
I'm using Socket.io v0.9.16 and
Chrome 34
I'm trying to remove a specific listener, or unsubscribe from a specific subscription
Something like this:
socket.on('testComplete',function(data){
con...
Agretha asked 15/4, 2014 at 19:24
4
Solved
I found example of using socket.IO 1.* width Express 4. Here is a link
Everyting works perfectly. But there is a code:
io.use(function(socket, next) {
try {
var data = socket.handshake || socket...
Whew asked 10/1, 2015 at 9:14
4
I trying to setup a very simple App to get familar with using SOCKET.IO in an React APP. Server looks like this:
const io = require('socket.io')();
io.origins('*:*');
io.on('connection', (client...
4
I have an application connecting to a Nestjs server to establish a WS connection (server is on a different URL, so it is a CORS request).
The WebsocketGateway is defined as such.
@WebSocketGateway(...
4
Solved
On socket.io 1.3.7, how to get the room of the socket on disconnect event?
socket.on('disconnect', function() {
var currentRoom = ???
socket.broadcast.in(currentRoom).emit('user:left', socket.id...
Caernarvonshire asked 4/12, 2015 at 16:40
7
Solved
I've followed the exact same steps which have always previously worked for me, create application through express, place the module dependencies in the node_modules folder. It appears that the sock...
1
I am trying to listen to model change events in TypeORM through a subscriber, and broadcast an event each time a new one is inserted. While external clients receive the event, the gateway's @Subscr...
© 2022 - 2024 — McMap. All rights reserved.