Questions tagged [socket.io]

Socket.IO aims to make real-time apps possible in every browser and mobile device, blurring the differences between the different transport mechanisms. It supports multiple transports, such as WebSockets, Flash sockets, long polling, and more, automatically falling back when a transport fails.

Socket.IO is a Node.js package designed to make real-time applications possible and easy in every browser and mobile device. It supports the following transport mechanisms:

  • WebSockets
  • Adobe® Flash® Socket
  • AJAX long polling
  • AJAX multipart streaming
  • Forever Iframe
  • JSONP Polling

Socket.IO includes a JavaScript library that allows for easy programmatic communication with the server.

Some interesting Socket.IO features include:

  • Automatic JSON serialization
  • Namespacing connections over a single multiplexed connection
  • Volatile messages
  • Rooms (logically grouped connections)

API documentation can be found on the project's Wiki.

Useful Links:

20688 questions
5
votes
2 answers

How do I Configure Google Compute Engine to use HTTPS for nodejs server?

I want to run nodejs & socket.io server in google compute engine with https / SSL. I installed self-signed certificate from https://cloud.google.com/compute/docs/load-balancing/http/ssl-certificates. Now, How Do I enable nodejs server to use https…
Love Sharma
  • 1,981
  • 1
  • 18
  • 37
5
votes
1 answer

Polling interval for xhr for socket.io 1.0

How do I set the polling interval for xhr fallback for socket.io 1.0? It looks like it polls every second when not in websocket mode but I'd prefer if the polling interval is every 2 seconds to reduce load on the server. I read through the…
slebetman
  • 109,858
  • 19
  • 140
  • 171
5
votes
1 answer

Simple WebSocket application with NodeJS

I gonna to make a simple WebSocket application waiting the clients to connect to. The clients would be Android users, and the application itself is a simple chat for two peoples. So for the Android application I need to know WebSocket address…
James May
  • 1,371
  • 3
  • 20
  • 37
5
votes
2 answers

how to handle page reload in socket.io client chat applications

I was implementing a chat application. I am not in server and the page which contains javascript file can be any html page on file system with the embeded javascript/socket.io in it. Now the problem is page reload by definition will always trigger a…
ManMohan Vyas
  • 4,004
  • 4
  • 27
  • 40
5
votes
1 answer

Emit data to a specific user using Socket IO,Laravel,Redis,Angularjs

I am building an app that gives students the ability to see their schedule which is created by the admin. Now each student has a group_id. I want to make the schedule update in real time so I applied this tutorial…
Yassine
  • 55
  • 1
  • 9
5
votes
1 answer

socket.io not reconnecting after a disconnect

I am developing a node.js application using socket.io to communicate between server and client. If the server faces any error, I send an error message to the client and I close the connection from both server and client. However when the client…
user1692342
  • 5,007
  • 11
  • 69
  • 128
5
votes
3 answers

Socket.io sharing socket data between namespace

I want to know how to share data being set in a socket in one namespace and access it on another namespace? I'm fully aware that i can attach data to the socket object itself.Problem arise when i attach the data on one namespace and try to access it…
slier
  • 6,511
  • 6
  • 36
  • 55
5
votes
2 answers

express.static(): "Undefined is not a function"

Been Googling for a while in order to find an answer to this question but I still can't get to find the matter in my code. I'm trying to make my very first Socket.io app that simply outputs a message to the console when a user connects. Here's the…
Drav'
  • 105
  • 1
  • 6
5
votes
0 answers

Google Play Game Services & Custom Server Logic Using Node.JS and Socket.IO

Like the Title explains all... is it possible to integrate GPGS and Node.Js for making a multiplayer game? Instead of using REST API's... Thank you
Elton Jothi
  • 116
  • 5
5
votes
2 answers

Node.js and redis on same server?

We're using cloud hosting (Linode) to host a node.js based (and socket.io) chat app, with redis as the main DB. We haven't launched yet, but we're looking at hosting redis and node.js on the same machine (8 gb instance, redis limited to 5 GB for…
StackOverflowed
  • 5,854
  • 9
  • 55
  • 119
5
votes
1 answer

Emitting a message in sails v0.11 (client-side)

I'm having some issues with the newest version of sails.js (0.11.0). It stated in github that plain socket.io code will be accepted and ran in sails.js; however, I am simply trying to emit a message from a client when they click on something like…
5
votes
1 answer

Android Nkzawa SocketIO disconnect and make new connection

I am working with android, socketio (nkzawa). When I connect the first time is working perfectly. But then If I disconnect and try to make "another connection" the EVENT_CONNECT is never called. Here I put some snippets When I connect Inside…
agusgambina
  • 6,229
  • 14
  • 54
  • 94
5
votes
1 answer

Node.js - Using Socket.io and Express on the Same Port

I need to refactor this node app so socket.io and express use the same port and I can deploy it. It currently works as-is, but won't run on Heroku unless everything's using the same port. var http = require('http'); var socket =…
Trey Hoover
  • 55
  • 1
  • 5
5
votes
2 answers

How can a client know if the emit failed? Is there any callback for socket.emit()?

If the client emit some msg to the server, is there any way for client to know if this emit is failed or not ? I think it my be some callback like : socket.emit("test",dataToSend,function(err){ });
Hohoho
  • 53
  • 1
  • 3
5
votes
1 answer

flask-socketio one room per user ? expensive?

I have a flask webapp running pandas to do some data analysis on the backend. Right now, i took the naive approach of using AJAX for user to send queries back to the server and interact with the data. but as it turns out there is a lot of overhead…
Shankar ARUL
  • 12,642
  • 11
  • 68
  • 69
1 2 3
99
100