All Questions
4,636
questions
0
votes
0
answers
10
views
Event handling for encapsulated socket.io server
I (js beginner) am creating a node.js webapp with socket.io. I encapsulated my socket server and namespaces to a single module that I call socketManager.js because I heard that this is generally good ...
0
votes
0
answers
37
views
Is there a way to keep my program alive if the server it needs to connect to is not up and listening yet?
So I've been trying to figure out how to keep my program alive if this separate server that I'm running is not open yet. Right now my program's site pulls up successfully but then the second I try to ...
0
votes
0
answers
17
views
Extending socket.io Socket interface with custom properties like user_id not recognized
I'm currently implementing authentication with socket.io in TypeScript for my project. When a user connects, I need to store their user_id on socket.user_id after verifying their JWT token in a ...
-1
votes
0
answers
43
views
Emitting Messages in useEffect While Strict Mode Is On
i make user connect to the socket as soon as they enter the website since i use socket instance in more than one component and i get sockets using useContext.When the user gets in the room component i ...
-1
votes
1
answer
26
views
How to change a source in response to socket IO event? JS + Socket IO + Node js?
I'm trying to make a simple online game. When one player clicks on an object, the background picture changes, and I want to change it with css for all the connected players.
I was first doing it with
...
0
votes
2
answers
73
views
RTC ice candidate gathering is not triggered when my call starts from callee side
There are my idea steps that I try to implement:
callee start a live and wait to a new caller join
caller join and then send offer and establish peer-to-peer following WebRTC workflow normally
Actual:...
0
votes
2
answers
41
views
Loading failed for the <script> with source “http://localhost:8000/socket.io/socket.io.js”
I am working on a chatting web app project where I am using socket io library of nodejs. When I run it on the browser i face "Loading failed for the with source “http://localhost:8000/socket.io/...
1
vote
0
answers
60
views
Socket.io events in React.js and Node.js are not being triggered
I'm building a chat application in React js and Node js.
The events that I have written in React.js and Node.js do not seem to be triggered. I can login and see data in both the browser and the ...
-1
votes
1
answer
41
views
Connect to local node.js server that is hosted by my pc and connect through phone that is usb-tethered
I'm hosting a localserver node.js server that uses websockets, and a frontend app through liveserver extension
That is happening on my laptop, it gets access to internet through my phone using usb-...
0
votes
0
answers
41
views
NextJS and SocketIO with TypeScript, how to get the io server outside server.mjs
I setup a NextJS server written with TypeScript with a SocketIO communication as described on this page : https://socket.io/how-to/use-with-nextjs.
I have a "use server" file that I use for ...
0
votes
1
answer
215
views
Access to XMLHttpRequest at from origin has been blocked by CORS policy No 'Access-Control-Allow-Origin' header is present on the requested resource
Issues connecting client to server.
Server on port 3000 and app on port 5001 via Live Server:
Access to XMLHttpRequest at 'http://localhost:3000/socket.io/?EIO=4&transport=polling&t=Oz_5Qur' ...
0
votes
0
answers
32
views
Integrating WebSocket with Existing Node.js E-commerce App for Chat, Calling, and Live Streaming
I'm aiming to enhance my Node.js-based e-commerce website with real-time features like chat, calling, and live streaming. Currently, it uses HTTP communication.
I have an existing e-commerce website ...
0
votes
0
answers
20
views
Can't change rooms using Socket.io
I'm attempting to integrate a way to change rooms using a function I already have that edits my html.
Client.js
function changeRoom() {
let previousChat = currentChat;
currentChat = newChat;
...
0
votes
0
answers
35
views
How can I decode the encoded MediaCodec bytes using Node.js or JavaScript?
I am a new Java learner who created a screen recording application in Java. The application was working fine, but I converted the stream to bytes using mediacodec and sent it via socket connection ...
-1
votes
1
answer
40
views
Issue with Preventing Form Submission in JavaScript
Title: Issue Preventing Form Submission when Uploading Files in JavaScript
I'm facing an issue with preventing form submission in my JavaScript code. I have a form that allows users to input messages ...