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
1 answer

Why is the broadcast described as flag in the docs when it is actually an object?

In the broadcasting messages section http://socket.io/docs/#broadcasting-messages there is the following description To broadcast, simply add a broadcast flag to emit and send method calls. Broadcasting means sending a message to everyone else…
Talespin_Kit
  • 20,830
  • 29
  • 89
  • 135
0
votes
1 answer

sending broadcast message from the client side in socket.io

In the socket.io client socket section of the doc http://socket.io/docs/client-api/#io#socket refers to Socket docs, which implies both server Socket object and client Socket object are the same. Also the docs…
Talespin_Kit
  • 20,830
  • 29
  • 89
  • 135
0
votes
0 answers

Disconnect the already loaded webpage(uses socket.io) before loading the new url in WebView

The WebView loads a webpage which uses socket.io WebView myWebView = (WebView) findViewById(R.id.webView); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); myWebView.setWebViewClient(new…
Talespin_Kit
  • 20,830
  • 29
  • 89
  • 135
0
votes
0 answers

storing socket connections in a javascript array and using Array.find() on the array behaves unexpectedly

In the following code after the sockets.find() statement the console.log("AFTER") statement is not executed io.sockets.on('connection', function (socket) { var this_socket = socket; socket.username = null; socket.gameSessionName =…
Talespin_Kit
  • 20,830
  • 29
  • 89
  • 135
0
votes
1 answer

How to share a session between Express v4 and Socket.io 1.3.2

I've been trying to share an express session to use from socket.io for the past couple of days and I just can't wrap my head around it. I'm using express 4.11.1 with socket.io 1.3.2 (other dependencies are express-session 1.10.1, cookie-parser 1.3.3…
Neman
  • 369
  • 1
  • 6
  • 16
0
votes
0 answers

Connection to socket.IO from angularJS

This question describes the same problem than this one. However the provided solution doesn't work for me. The log of my angular app looks like (the last digit increments every second or so): GET…
xShirase
  • 11,975
  • 4
  • 53
  • 85
0
votes
1 answer

Socket.io - Server Relaying, client-to-client messaging

Socket.IO, I'm either over-thinking it, or I just don't understand how it works. Probably the latter. Can someone please help me out. I am seeing examples all over the place that talk about emitting , back to the sender, broadcasting to all clients,…
Steve Oh
  • 334
  • 3
  • 7
0
votes
1 answer

Concurrent timers in node.js with socket.io

So I'm developing simple game with the following scenario: 2 users need to start a game (so I'm creating new room for 3rd user and so on) 2 users is maximum per room When game is started, event is sent to client, after 60 seconds server needs to…
Splendid
  • 1,317
  • 4
  • 20
  • 41
0
votes
1 answer

Nginx as proxy server for sockio.io websocket not working on remote

On my developing macchine I have nginx as proxy server for websocket with this configuration: server { listen 80; location /socket.io { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For…
albanx
  • 6,193
  • 9
  • 67
  • 97
0
votes
2 answers

socket.io: socket reconnect in version 1.0

I'm trying to migrate from Socket.IO 0.9 to 1.2.1, and I'm having some difficulty with socket reconnection. In 0.9, I could do something like socket.socket.reconnect();, but unfortunately, socket.socket doesn't exist and socket.io.reconnect doesn't…
incutonez
  • 3,241
  • 9
  • 43
  • 92
0
votes
1 answer

Result of socket.io request in IE 9 is Pending

I am running node.js/socket.io server. I am testing with IE 9. When I open dev tool in IE 9, many of the socket.io request are displaying their result as "Pending..". Although I see they have returned the result which I want. I am not sure if this…
pmverma
  • 1,653
  • 13
  • 27
0
votes
1 answer

How can I get the socket ID from an event in Socket.io?

I want to know which client sent an event when it arrives on the server. For example: var socket = require(socket.io')(port); socket.on("ask question", function(data){ var socketid = // ? //respond to sender …
user3818284
0
votes
0 answers

socket.io 1.1 - connecting

Migrating from 0.9 to 1.1. In our previous version we were checking to see if socket was connecting using socket.socket.connecting. What would be the equivalent of this for 1.1? Connecting seems to no longer be present. Thank-you
Thibs
  • 8,058
  • 13
  • 54
  • 85
0
votes
1 answer

Issue with Php-redis - socket.io to emit to specific user

I got an issue with php-redis with socket.io ,in their example here https://github.com/rase-/socket.io-php-emitter im trying to emit to specific user which is set on my socket.io nodejs server , in a varible called: var users = {}; this carible…
DreamDev
  • 11
  • 2
0
votes
0 answers

Change polling frequency in socket.io 1.1

I'm using socket.io 1.1 to access a server behind Amazon elastic load balancer. Because elb doesn't support websocket, polling is the chosen transport. How do I change the polling frequency to increase the polling interval? Thanks!
lastoneisbearfood
  • 3,955
  • 5
  • 26
  • 25