Most voted "socket.io" questions
78 questions
Sort by count of
-
8
votes2
answers969
viewsHTML Desktop app with Node.JS + Socket.IO
I need to develop an HTML-based chat app that connects to a Node.JS server that is running with Socket.IO. I even developed much of the app using Tidesdk, but at the time of the integration to call…
-
8
votes1
answer501
viewsWhy Nodejs has versions 4.x, 5.x, 6.x and 0.1x.x, etc
Why Node.js exists in versions 4, 5 and 6, but also exists in versions 0.x.x. Or perhaps, what are the differences between the versions x.x and 0.x.x?
-
7
votes1
answer390
viewsHow to create a loop to send an event in socket.io?
I have an architectural problem. I have a code using socket. in nodejs: socket.on('images',function (aData){ ... socket.sockets.emit('show', JSON.stringify({imagens : json})) }); I’m trying to…
-
5
votes1
answer684
viewsNodejs running at Gate 80 with Apache
Well, it’s like this, whenever I want to use socket.io I have to use some port, so whenever I want to have access to the web page that works with the socket.io I have to go to : wwwwww.meusite.com:.…
-
5
votes2
answers939
viewsGenerate a random profession for Online Players
I am creating a small game (Android) to play I more friends of mine. The game is called "Cops and Thieves". At least it is necessary to have 4 players in which one of them will be the POLICE,…
-
4
votes1
answer287
viewsData stream with socket.io
Hello I am doing database data stream this way below, sé que esta sobrecarregadno muito o navegador do client, teria outra forma de stream sem ocorrer essa sobre carga? var express =…
-
4
votes1
answer358
viewsDoubt about the socket.io functioning
I have a question regarding the socket.io that I have already researched in several places and most of a rolled up or uses some obscure terms, but ends up not answering the doubt directly. The…
-
4
votes1
answer75
viewsWhat are the best practices for implementing Socket.io?
I am starting my studies on Socket.io, precisely in my project involving the technologies of Vue/quasar, and I would like to understand how the logic behind these following fundamentals unfolds: How…
-
3
votes1
answer177
viewsBroadcast via an Express route
I have an endpoint in a Node application that when called should trigger a broadcast for the connected users in the Node application. That is, as soon as the user entered the system he would connect…
-
3
votes1
answer64
viewsDifference in Socket.io declaration
I’m starting to work with Socket.io on Node.js, the doubt for now follows simple. Using my example below. What’s the difference in using socket.Emit() and chat.Emit()? PS:*I hope you don’t have a…
-
3
votes2
answers288
viewsHow to create a message sequence in Javascript?
I have an application made in Node, Express and Socket.oi in which alerts are sent to a certain screen that receives the message through the socket.io, on this screen I receive the message, format…
-
2
votes1
answer81
viewsSocket.io: module cannot be found
I was here "playing" with Socket.io, all working nicely, when I gave the command node app.js overnight Nodejs gives me an error (it was working before) Cannot find module 'socket.io' I looked for…
-
2
votes2
answers389
viewsAsynchronous server execution problem with Express, Mysql and Socket.IO
I am developing a Node.JS project with Express, Mysql and Socket.IO. When the user opens the main page provided by the server, the request must cause data to be read from the database and sent to…
-
2
votes1
answer207
viewsHow to restrict customers who receive messages with socket.io
Guys, how do I get this control on the socket.io. I’ll illustrate my situation: imagine I have a list of friends, how do I get my messages to reach only my friends and not all connected clients,…
-
2
votes1
answer1566
viewsNode.js does not load js or css scripts
I’m making a chat app and I can get the page I want but this page does not load the corresponding css or js scripts, does anyone have a solution for this please? So far I’ve got this: Code:…
-
2
votes3
answers450
viewsSocket.io chat, setting url
I would like a help with chat using socket.io, I would like to define a URL, I am not getting, I can only access through localhost:3000. For example I wanted the chat to be on the homepage of my…
-
2
votes1
answer725
viewsERR_SSL_PROTOCOL_ERROR - Socket.io and Node.js
I am running a Node.js server using Socket.io to manage connections via Socket, but I am having a problem with SSL certificates. Most users can access the Node.js server normally, but others cannot…
-
2
votes1
answer653
viewsCatch Querystring with Nodejs
I need to pick up the QueryString which is being passed to the server created on Nodejs. I’ve tried several ways but I can’t get the parameters of and Ph. I’m a beginner at Nodejs and the code I…
-
2
votes1
answer674
viewsNode JS, Socket.IO Rooms and namespaces
I’m developing a map-based android app, which will create chat rooms in some predetermined places and places where users need them. I did some research with mechanisms that I could use in my…
-
2
votes1
answer1008
viewsVideo stream with Nodejs and Socket.io
I need help to stream with Nodejs and Socket.io. I’m using the rtsp-ffmpeg library to stream. I was able to execute it transmitting in img format according to the specific documentation itself, but…
-
2
votes1
answer267
viewsHow to optimize a Node.js script
Hello, I would like the help of users to optimize a script I made in Node.js. I do not understand much of the language and I made a very amateur system that is a little slow. var express =…
-
2
votes2
answers709
viewsHow to get the connection id of a socket on a js Node server?
Hello, I am studying sockets with Node js for games and I would like to know how to recover the id of a client socket connection with the server, I have tried several ways but did not succeed! My…
-
2
votes0
answers27
viewsConnection terminates when sending a message from the client to the server (c/c++ socket)
I am using the codes below to make a client-server connection. The client I am making myself and the server for the time being picked up on the internet. The connection between them is made and the…
-
1
votes0
answers51
viewsClient Socket.io acknowledgement for server
I know it is possible to use callback functions in socket.io, an example is found in the link http://socket.io/docs EXAMPLE Client socket.emit('ferret', 'tobi', function (data) { console.log(data);…
-
1
votes0
answers265
viewsAudio stream (Webradio)
Good afternoon. Excuse my ignorance, but how do I create a radio web (in a very rustic way, only for study purposes)? My project is the following: I have a website that plays the audio and who…
-
1
votes1
answer167
viewsError sharing HTTP Session with socket.io. io.sets "is not Valid".
I am applying the step by step book "Node.js, real-time applications" of Caio Ribeiro Pereira. All right until the part about sharing the HTTP express-Session to the socket.io. As far as I can see…
-
1
votes0
answers55
viewsHow to create and connect users in new Rooms with soket.io
am using socket.io 1.3.5 and express 4.12.3 to create chat app in my script php, but I don’t know the logic of creating a new room when one user calls another. As kids: I know how to create a room…
-
1
votes1
answer62
viewsmaking error message variable?
personal hello I have a servdor and it is giving a simple error but I do not know how to solve being that the objects are apparently normal see the code below. var io =…
-
1
votes1
answer827
viewsHow do I send a message to a specific room with Socket.io?
How do I send a message to a specific room? guy: server.js io.in('roomA').on('msg', function(msg) { ... }); client js. io.in('roomA').emit('msg, 'Hi');…
-
1
votes0
answers38
viewsSocket.io-Stream does not broadcast events
I have a client application that sends files through socket to my server, these files arrive as stream through Socket.io-stream, and I write them on disk without any problem everything was going…
-
1
votes1
answer404
viewsConfigure Nginx for multiple Socket.IO servers
The idea here is to decentralize, make a load Balancing. In the following scenario: .1 a website serving multiple subdomains with Nginx .2 two or more servers nodejs spinning socket.io My need with…
-
1
votes0
answers104
viewsHow to send messages using Angular and socket.io?
I followed in the footsteps of this video and I was able to make a web messaging app. Now, I’m trying to implement these codes in my Ionic messaging app. But when trying to send a message, this…
-
1
votes1
answer430
viewsDoubt in the use of Socket in java on android
I want to implement data transmission via Socket, I’m trying to implement Socket.io but I don’t understand how it works. I want to communicate between two android devices. I know you have the server…
-
1
votes1
answer45
viewsStart nodejs in Azure
I have a problem to initiate the nodejs in the server Azure, I’ve set everything up and the site is already in the air, but I have a chat in Ode, using socket.io, see the code below (index.js): var…
-
1
votes0
answers101
viewsSocket.io connects but does not send Emit to the server and vice versa. Nginx and SSL
I am using Nginx with SSL and this setting for a service to communicate with Node, when I access the address the socket.io normally connects with the server but does not receive Emit or send.…
-
1
votes0
answers68
viewsDoubt Socket.io Push Notification
Hello, I have an application made with Node.js and socket.io that sends a push notification when the.html client page is open. my question is: How to send and receive notification even if the.html…
-
1
votes1
answer634
viewsCall Counter Socket.io
Well, here’s the thing I have the following code in my app.js of my project, which I picked up on the Internet to study: // Servidor: app.js // Iniciando servidor HTTP var app =…
-
1
votes0
answers30
viewsSocket.io. How to connect and upload user id
By default the socket.io generates a unique id. I need this id to be the same id as the user in the database. Have any way to set the id? if not, how my client front recovers the id generated by the…
-
1
votes1
answer539
viewsError socket.io Node.js
The intention with the program is that when two clients connect to display in a client window the id of the other. The program saves the two ids in the variables but sends only to the first user who…
-
1
votes1
answer86
viewsFunction loading problem Node socket.io
I have the following code: module.exports = function(app) { app.get('/', function(req, res) { res.render('chat/index'); var io = app.get('io'); io.on("connection", function(socket) {…
-
1
votes1
answer203
viewsDo multiple requisitions or just one?
I am making an application in nodejs, where constantly it is necessary to consult information in the database, for example: name, description of items and etc... A similar site would be Netflix,…
-
1
votes1
answer125
viewsGetting no answer Socket IO
Hello, Can you please tell me where the mistake is ? I created a file in the root folder, server.js var socket = require( 'socket.io' ); var express = require('express'); var app = express(); var…
-
1
votes0
answers29
viewsRancher 1.6 websocket does not work
I’m having trouble using Socket.IO inside Rancher 1.6. Websocket connections sometimes even work but most of the time it is giving 503 or 502 error. I tried some settings within Haproxy to make…
-
1
votes1
answer66
viewsWhy doesn’t anyone plug into my socket.io?
Hello! I have an api with the following example code: const app = require('express')() const http = require('http').Server(app) const io = require('socket.io')(http) const cors = require('cors')…
-
1
votes1
answer44
viewsError in socket.io "expression cannot be called" in React/Next
I’m trying to make a Real Time Chat with socket.io with Next.js, but when it comes to importing and putting as constant is returning an error, I don’t understand because I’m about to make this code…
-
0
votes1
answer637
viewsaccess apps in Heroku giving error
well guys I’m trying to install an apps in Heroku but I’m not getting to visualize the status of my apps my apps is a server in Node.js and socket.io in Heroku there is the option of deploying by…
-
0
votes0
answers67
viewsNodejs - socket.io error : xhr-Polling
I’ve got a nasty J server set up this way: var express = require('express'); // CHAMADA DA API EXPRESS var app = express(); var server = require('http').createServer(app); // CHAMADA DO HTTP var io…
-
0
votes1
answer160
viewscannot get/ chat socket.io
I am trying to start the socket.io service, but error appears Cannot GET/ my server.js is like this var socket = require( './node_modules/socket.io' ); var express =…
-
0
votes0
answers76
viewsIs there a socket.io event that activates when the client’s internet is slow?
Hello. I am in a project in nodejs + socket.io, I am with big problem, in relation to the client’s slow internet, I need to know if in socket.io there is some kind of event like this // If the…
-
0
votes0
answers87
views404 socket.io.js with express in Node.js
I’m creating a simple chat that switches simultaneous messages between 2 browsers, using Node.js with socket.io, but for some reason, my project can’t identify my socket.io.js within the project.…