Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

Where do I find server response data in socket.io-client?

I am interested in creating (for testing purposes) a fake client that mimics a browser accessing a route in a Node.js HTTP server. In the minimal example below, I am able to point an actual browser to ...
P. Lewis's user avatar
1 vote
2 answers
44 views

Handle disconnects in multiplayer JavaScript game

I am creating an online multiplayer game in JavaScript (JS), think Lichess or Chess.com but for another game. I now want to detect if a user disconnects but having trouble figuring out how to do this ...
eligolf's user avatar
  • 1,876
0 votes
0 answers
22 views

Socket.io used 442GB of bandwidth on my Render server, when prior to that it did not exceed 1GB

I host an api on render for 7$ monthly and for my app it is more than enough. At the end of February I got an invoice of 124$ for bandwidth "beyond my plan", exactly 442 GB. I did not make ...
Tudor Cebotarenco's user avatar
-1 votes
0 answers
19 views

How to resolve circular dependency between two contexts in ReactJS?

I am developing a real-time code editor and I am facing circular dependency between two contexts FileContext and SocketContext as FileContext using socket client methods to synchronize and handle the ...
Sumit Gohil's user avatar
0 votes
0 answers
12 views

Socket.io Disconnect Event Not Broadcasting to Other Users in React & Express

I am using Socket.io with React (frontend) and Express (backend). My connection works fine—I can send and receive messages without any issues. However, when a user disconnects, I am broadcasting an ...
Arpit Sharma's user avatar
0 votes
0 answers
34 views

Web socket connection disconnected automatically

I'm using a Node.js server application for the backend and an Angular application for the frontend WebSocket connection. Server Side Code var io = require('socket.io')(app.listen(port)); io.sockets....
Raghu's user avatar
  • 11
0 votes
0 answers
34 views

Socket check for triggering timeout

socket.timeout(timer).emit('foo', (error, response)) I need a method to check if the timer is started
Nikolay10987's user avatar
0 votes
0 answers
13 views

keepSessionInfo for passport.js not working for versions 0.7-0.6?

Any calls made to my passport.authenticate() middleware deletes and recreates my req.session object. I need it to stay consistent because it's shared with my socket.io connection. After some digging I'...
chron1cle's user avatar
0 votes
0 answers
43 views

how to know when websocket upgrade fails in socket.io

i am using socket.io in a simple javascript app. I want to alert the user when upgrade to websocket fails due to any reason and HTTP long-polling is used as a fallback, so user knows that connection ...
Imtiaz Shakil Siddique's user avatar
0 votes
0 answers
24 views

socket.io works with http, but won't with https (font react, back express, socket.io, server nginx)

all is in the title, i recive a socket from server in http (curl "http://domain_url:3000/socket.io/?EIO=4&transport=polling") but my app have to be with https. when i use https in curl i ...
jonathan joly's user avatar
0 votes
1 answer
26 views

How do I know if a disconnect occurred due to the beforeunload event in socket.io?

I am in a situation where I want to do different things depending on the following two possibilities: If a disconnect occurs because the page has been unloaded If a disconnect occurs through other ...
trevdev's user avatar
0 votes
0 answers
28 views

SocketIO client i can see all event on the network tab event when i only listen to specific event

For example if i listen to NOTIFICATION/USER_ID/2 i can see all the socket event on network tab, i dont want the current user to be able to see another user event because its not belong to them how to ...
Jordan Ravelino's user avatar
1 vote
1 answer
52 views

How to fetch a list<dynamic> from MongoDB and convert that to a list<object>

I am using Flutter, MongoDB, Mongoose, NodeJS and SocketIO. In MongoDB I am storing a list<object> object, querying the object with model.find() and passing the results back to the client. But ...
user29365632's user avatar
0 votes
0 answers
23 views

Socket.IO to().emit() works locally but not on EC2 behind an ALB (WSS configured)

I’m using NestJS with Socket.IO and RabbitMQ. Locally, everything works as expected: when the client emits a send_message event, the server processes it and then sends a receive_message event to the ...
Universpace's user avatar
1 vote
0 answers
29 views

WebSocket connection works in Vite development server, but fails in Vite preview with NestJS backend

I’m using Vite for the frontend and NestJS for the backend in my project. During development, everything works as expected with WebSocket connections (via Socket.IO), but when I try to run the ...
Compilation's user avatar
0 votes
1 answer
30 views

Getting CORS error when using socket.io, but only when the user disconnects and connects again. Why is this happening?

I am not getting any errors when the frontend is already running and then i start the server. The socket connection is formed without any issues. However, If I disconnect the frontend and start again, ...
Saifullah Rahman's user avatar
0 votes
1 answer
37 views

Initializing Socket IO custom client in React causes white screen; pages render only when client is not initialized

I'm building a drone control interface using React and TypeScript with socket.io-client to communicate with a Tello drone. When I initialize the TelloSocketClient class (which wraps the socket ...
Deshy Dan's user avatar
0 votes
1 answer
75 views

TCP connections in CLOSE_WAIT state not closing in the Microservice(FastAPI with Socket.IO) running as Uvicorn(ASGI Web Server)

Context Microservice based out of FastAPI microframework with SocketIO server wrapped as ASGI application executed on Uvicorn Webserver. The service has several socket events written to handle events ...
Jeyshiv's user avatar
  • 25
0 votes
1 answer
40 views

invalid namespace when using socket.io

I am using socket.io as the websocket lib to do some communication. This is the socket.io(v4) server side code look like: // websocket const websocketServer = new Server(httpServer, { cors: { ...
Dolphin's user avatar
  • 39k
1 vote
0 answers
22 views

Swift Socket IO does not get emitted event from server (intermittently)

I have a Swift app that uses Socket.IO, and sometimes, the socket just refuses to get events triggered from the Server for some unknown reason (there is no disconnection and there is no error log that ...
Jesse Joseph's user avatar
0 votes
0 answers
11 views

Peer + Socket - Failed: Invalid frame header (node, heroku)

I searched and found that some people had the same problem, but the way they solved didn't work for me, so I think my problem might be a little different. In localhost worked fine (peerjs and socketio ...
Sdasdsa Dasdsad's user avatar
0 votes
0 answers
25 views

Why video stream is not showing during WebRTC

I am working on a problem where I am using WebSocket as a signalling server or use for live chats and use WebRTC for video and audio communication where I set sdp offer and answer and again set ...
Badal Kumar's user avatar
0 votes
0 answers
33 views

Socket.io doesn't work on secure (tls/ssl) connection

I am developing an web app that utilize Socket.io for communication between client's browser and backend. For the environment, I ran both backend and frontend under single container, and it works ...
isca_'s user avatar
  • 41
0 votes
0 answers
46 views

How to change the default context path of socket io server side implementation using netty in java spring boot application

We have implemented socket io server side implementation using netty socket io in existing java spring boot application. We are able to connect socket io by using localhost:8788 from postman. And in ...
Nani's user avatar
  • 11
0 votes
1 answer
22 views

Two functions reach the identical socketio.emit line. One emits the other doesn't. Can't wrap my head around it

from flask import Flask, send_from_directory from flask_socketio import SocketIO import time import threading import os import serial # Serial Configuration (Modify COM Port if needed) SERIAL_PORT = &...
SeanBing's user avatar
0 votes
0 answers
12 views

Flask-SocketIO and Vue: Stuck on Port 6114 Instead of 5114 — Hardcoded References?

I have a Flask-SocketIO backend (viewer.py) and a Vue frontend (using Vite). I’m trying to switch from port 6114 to 5114 for my socket connection, but can’t get the code to reflect that change. Even ...
baluviki's user avatar
0 votes
0 answers
17 views

redis + socket.io : How to get total clients & clients per rooms across all nodes/instances

Searching for this I found nothing but very old posts that were no longer applicable or not quite what I was looking for. AI assistance was circling between 3 broken solutions and the documentation on ...
FMaz008's user avatar
  • 11.3k
0 votes
0 answers
31 views

Socket io server side implementation using java netty-socket and want to know which server it is running? In spring boot

We have a spring boot application already which is running on tomcat server. As per the requirement we need to implement socket io server side implementation using java. So have added below dependency ...
Nani's user avatar
  • 11
0 votes
0 answers
28 views

Socket.io: How not to lose or restore state on disconnection?

"socket.io": "^4.7.4", "socket.io-client": "^4.7.4", Hello! I'm working on implementing reconnection logic for my project and have some questions about the ...
Marco Vanali's user avatar
0 votes
0 answers
16 views

How to Restrict Socket.IO Connections to a Specific Namespace in NestJS?

I'm working with a NestJS application and implementing a WebSocket gateway using Socket.IO. In my WebSocketGateway class, I set the namespace to /socket like this: @WebSocketGateway({ namespace: '/...
Hanaia Youcef's user avatar
0 votes
0 answers
19 views

Scaling socket.io chat server

i use Node.js and Socket.io to create a backend for a chat app i have. It should support a single, large (10K users) chat room. When a user send a message all the others can see it. The client and ...
berger's user avatar
  • 1
0 votes
1 answer
23 views

socket.io with cordova android device

i am trying to use socket.io on cordova with android device,following tutorial. http://socket.io/socket-io-with-apache-cordova/ According tutorial,socket.io is downloaded from external server(cdn). &...
Tom's user avatar
  • 11
0 votes
1 answer
115 views

Socket room event not received in React component

I'm developing a turn based game with React, Fastify and Socket.io for a scholar project. The player A create a game which create a socket room server-side using the game id as room id. The, he wait ...
Skunka's user avatar
  • 553
0 votes
0 answers
20 views

socket.io client not able to receive events stop working after some time. But when client emit it works i recive data on same socket id

I am working on chat app. where I use different socket events to send message from client to server through sockets. Here is how it works client send request with jwt on socket I check it is connected ...
kashan ilyas's user avatar
0 votes
1 answer
46 views

Socket.io with load balancer

I am working on abc project by using websocket. we are using load balance for our application deployed by PM2 so i am using just in-memory for storing socket connection like that. Map<number,...
Rojith.P's user avatar
1 vote
0 answers
39 views

Socket.io code snippet explained (JavaScript setTimeout and function.apply)

I have two questions regarding the following socket.io code snippet: const withTimeout = (onSuccess, onTimeout, timeout) => { let called = false; const timer = setTimeout(() => { if (...
LudarA's user avatar
  • 11
0 votes
1 answer
35 views

Socket io disconnects while app is on background (ionic capacitor ios)

we've a socket.io client for chats and for some data fetching also, so the problem is when we put the app in background in IOS, after 30 seconds it disconnects, yes it connects again when you put the ...
Rameez Arain's user avatar
0 votes
1 answer
45 views

Configuring Socket.io and Caddy

I am trying to set up a socket server between my node backend and React frontend and am using Caddy as my reverse proxy. I am having trouble getting a connection once Caddy was introduced into the ...
Daniel Zamloot's user avatar
0 votes
0 answers
13 views

socket.io is not working on live backend endpoint

import axios from "axios"; const api = axios.create({ baseURL: "https://api.*****.net/api", // baseURL: "http://localhost:8800/api", headers: { "Content-...
Business Scopioe's user avatar
1 vote
0 answers
48 views

Laravel Echo / Socket.io WebSockets connection via redis not working (React)

I'm having a problem with setting up Laravel Echo via Redis in my Laravel application, using socket.io-client on the front end. Thanks to anyone who takes the time to take a look! Context : Laravel ...
Yoyo's user avatar
  • 11
0 votes
0 answers
32 views

Setting up Nginx Webhosting with React and socket.io

I'm trying to configure nginx to work with my socket.io websockets. I have an app with a React frontend and a backend that uses Nestjs and Socket.io. The app runs fine on my local machine but now I'm ...
i'mlearningtocode's user avatar
0 votes
0 answers
45 views

How can I implement multithreading in socketio and FastAPI?

I have a FastAPI application. When the user enters a room id on frontend then a dedicated worker thread is started for each room that emits the time every second to the frontend. Apart from emit event ...
nilay singh's user avatar
0 votes
0 answers
30 views

How can I sync client-side data (localStorage) with server-side logic using Next.js API routes

Question: How can I sync client-side data (localStorage) with server-side logic using Next.js API routes and WebSocket? I have a Next.js TypeScript application and I want to use built-in API routes as ...
Pachara Bunjong's user avatar
0 votes
1 answer
27 views

socket.io.emit() not running inside redis function

I'm building a Flask application where I use Redis to receive data from a server, and then send that data to the frontend using Socket.IO. However, the emit() function is not sending the data to the ...
sanabil mustafa's user avatar
0 votes
0 answers
58 views

Need help setting up Netty/SocketIO SSL on Spring Boot application

Trying to set up SSL for my Spring Boot application that's running Netty-socketIO com.corundumstudio.socketio.SocketIOServer;, connecting to it from my React FE using socket-io-client NPM package. The ...
Ye Paing's user avatar
0 votes
0 answers
18 views

Celery worker and socket io communication issues

I'm trying to make an app that has multiple socket connections and uses celery workers to periodically send messages to them. Here's the code: app.py from Controllers.MediaController import ...
user29085907's user avatar
0 votes
0 answers
48 views

WebSocket Connection Error with React, Nginx, and Docker Setup

I am setting up a React application with a backend API and WebSocket server, using Nginx as a reverse proxy. However, my WebSocket client fails to connect to the server, and I get the error: Socket ...
siddesh's user avatar
  • 21
0 votes
0 answers
16 views

TypeError: Cannot read properties of undefined (reading 'server') while calling socket.io in nextjs

I am trying to implement real-time notifications in a Next.js application using Socket.IO. My goal is to emit notification counts from the server and display them in the client. However, I’m running ...
Ponsakthi Anand's user avatar
2 votes
2 answers
64 views

Phaser: Beginner and having issues syncing multiplayers into different scene

I'm building a multiplayer game using Phaser 3 and Socket.IO. I have two scenes: CommonScene and BridgeScene. Players can move around and see each other in CommonScene, and there's a zone that ...
Corridorer's user avatar
1 vote
1 answer
26 views

How do I send big files in nodejs from the client to the server without an "Uncaught out of memory" error?

When sending a big file, such as one over twenty megabytes from the client to the server using a fetch request, the HTML page with the file input freezes for about 10 seconds and gives the error in ...
Aayush's user avatar
  • 13

1
2 3 4 5
416