Questions tagged [socket.io-1.0]

The latest version of Socket.IO library.

Socket.IO enables real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed.

Migrating from 0.9.x

255 questions
0
votes
0 answers

How to automatically start and keep socket.io instance in server

I have been developing a chat application using socket.io on Ubuntu and it needs to be run manually using the command line prior to test it on browser. I am a PHP developer and how am I supposed to run the application on the server side without…
Teshan N.
  • 2,307
  • 3
  • 30
  • 59
0
votes
4 answers

Node JS Socket.IO Emitter (and redis)

I'll give a small premise of what I'm trying to do. I have a game concept in mind which requires multiple players sitting around a table somewhat like poker. The normal interaction between different players is easy to handle via socket.io in…
0
votes
2 answers

private chat with socket.io in node.js

I'm trying to create a chat system, where a user can send message to everybody (and this message is displayed in the div with id "chat") and I've achieved this feature. Now I'd like to implement a private chat. A user can click on another user's…
splunk
  • 6,435
  • 17
  • 58
  • 105
0
votes
2 answers

Socket.io 1.3.7 not cleaning up on client disconnect

I have a node.js script which allows a client to connect and receive some realtime data from an external script. I have just upgraded node.js & socket.io to the current versions (from <0.9) and am trying to get to grips with what happens when a…
user3788685
  • 2,943
  • 5
  • 26
  • 45
0
votes
2 answers

How to bind to ready event on socket.io?

I have the following express/socket.io application: var express = require('express'); var sio = require('socket.io'); var app = express(); var server = require('http').createServer(app).listen(3000, function () { console.log('Server listening on…
Erik
  • 14,060
  • 49
  • 132
  • 218
0
votes
1 answer

How do I make socket.io + ejs + mongoose work properly?

My goal is whenever someone press accept button it will, automatically increment the notifications on the navbar. The logic 1) An admin press an accept button 2) User's navbar will listen to notify event and will increment the number of the count…
Jack Moscovi
  • 2,195
  • 7
  • 30
  • 49
0
votes
2 answers

socket.io and pm2 : how does version number in node.js works?

when I run node -v I got 4.2.1 which is very strange since I remember I worked with 0.10 versions: I am totally lost with nodejs versions reading the pm2 doc Warning: If you want to use the embedded load balancer (cluster mode), we recommend…
yarek
  • 11,278
  • 30
  • 120
  • 219
0
votes
0 answers

How do I determine transport type in socket.io consistently (version >= 1.3)

This question has been asked before, but that answer is no longer correct. I'd like to determine transport type at runtime - if I have a ws connection, I'll route my REST requests over the websocket, and if I'm on polling, I'll do the old-fashioned…
pfooti
  • 2,605
  • 2
  • 24
  • 37
0
votes
1 answer

Socket.IO TypeError: Cannot read property 'emit' of undefined

I wrote the following code for chat client to client(client1 to server server to client2) but I am getting an error: Missing error handler on socket. TypeError: Cannot read property 'emit' of undefined Here is my serverside code. var app =…
user4909217
0
votes
1 answer

How to implement socket.io authentication with bearer token in nodejs

How validate the incoming connections , how create private namespaces , before emitting any event to client how to validate the client role every socket
HDK
  • 816
  • 1
  • 8
  • 13
0
votes
1 answer

Share whiteboard with other user using node.js and socket.io

I need some idea regarding whiteboard sharing with other users.Suppose one admin user wants to share his whiteboard with one user.What he is writing/erasing on/from whiteboard this will display to other user.The other user can only read from the…
satya
  • 3,508
  • 11
  • 50
  • 130
0
votes
1 answer

Calling a variable to a different route not working in nodejs and express

I have my app.js set up like this: app.js var express = require('express'); var socket_io = require("socket.io"); var app = express(); //Our route variables. var routes = require('./routes/index'); var users =…
Tony
  • 351
  • 3
  • 19
0
votes
1 answer

Using net module in socket.io browser keeps loading

I want to use the tcp net module in node.js, my clients will be browser and also not browser ( device ). when I tried to run in the browser the index.html, my browser keeps loading looks like it looping..I dont know what's wrong in my code. I tried…
jemz
  • 4,987
  • 18
  • 62
  • 102
0
votes
1 answer

Socket.emit not working as expected

i write a small code. var app = require('../app'); var debug = require('debug')('PHCServer:server'); var http = require('http'); var pg = require('pg'); var port = normalizePort(process.env.PORT || '3000'); app.set('port', port); var server =…
mathlearner
  • 7,509
  • 31
  • 126
  • 189
0
votes
0 answers

Setting a friendly name for sockets in socket.io

I'm working with a socket.io project like a chat room. Every time someone sends a message, they send a human friendly name (like "Joseph") along with their name to be shown with their message. However, I'd like to know if there's a standard way to…
AlexStack
  • 16,766
  • 21
  • 72
  • 104