Try to understand Socket.IO - socket and transmit

I'm trying to understand Socket.IO, but i need help. I'am looking at the Socket.IO docs and found this piece of code: var io = require('')(); io.on('connection', function(socket){ socket.emit('an event', { some: 'data' }); }); Source: http:/

Socket.IO will not respond

On my server side, I can't get a listener attached to a client connection to respond. I can successfully emit a message when a client connects, as well as successfully respond to the server from the client side, but can't respond beyond that. Server

A function does not work with

I'm trying to send an array from a server that contains all the IDs of the users when someone connects on the server using socket io. Apparently, the emitting part seems to work properly, but the receiving part is not responding at all. io.sockets.on

Socket IO does not send a table

I am trying to show all usernames online with Here is the server side code: var app = require('express')(); var http = require('http').Server(app); var io = require('')(http); app.get('/', function(req, res){ res.sendFile(__dirnam

How can I identify the user when the user reloads the page

I'm creating a card game like crazy8. And I already publish prototype. Look here My problem is, when I reload the page during the game, socket is disconnected and my is changed. So server side program can't identify me. does not work with React Native on Android

I'm learning React Native recently, and having trouble with using Socket.IO. I'm using latest React native and cli(just updated), and this is my code: import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'reac

Cast AnyObject to a specific class

I'm using Swift Library. With the following line of code, socket.on("info") { (dataArray, socketAck) -> Void in let user = dataArray[0] as? User print(user._id) } dataArray[0] is a valid object but user appears to be nil after casti

is this legal in

This is my function: io.on('connection', function (socket) { socket.on('checkcrn', function (msg) { socket.on('error', function(err){ console.log("err + " + err); }) console.log("message " + msg); }); }); What I am trying to do is call

How to find the Node.js connection address with SSL?

I have a Laravel PHP application running on a Forge server. There are multiple Nginx sites on the server. I am attempting to set up a connection. I had this running previously with HTTP, but with SSL is breaks. To start, I made a new site i

Need help creating an asynchronous function with callback

I have a JSON object with some entries (Appointments) each thereof an "location id". Then I loop trough these entries and emit a request to my nodeJS server by socketIO to get data from document with the location id. At the end I need an array w giving an error on heroku

i am trying to deploy my app on heroku.i added redistogo addon in my is based on node.js and express. i write a small code var redis = require(''); var io = require('')(server); io.adapter(redis(process.env.REDISTOGO_UR

Node + chat server. Can I miss messages?

I have done a couple of projects using Node JS & In my last project, which was building a chat-room like functionality, I did following things. I rendered a blank box, where chat messages were to be shown. Then I connect to the

open gps tracker git project openshift

Sorry to bother you with that but I'm struggling with this almost 2 weeks now and researched a lot and didn't find any solution: I'm trying to run a this git project < a href="">open gps tracker

transmit function angularjs

Hi I'm building a web app that updates the user via how many tasks users have created on the website. I'm using socket.emit on the node.js side that will send a message to the angularjs client everytime a client creates a new task. However

can unit3 work with

i'm trying to connect to my node.js server using client. the problem is that unity does not support it, as well a the current .Net version. i tried some 3rd party solutions like this with no luck (a lot of bugs and crushes). can anyone reco

Creating server-client tests for in python

Could anyone point a complete newbie to the place where I can learn about Python framework to test I am pretty good at writing scripts for testing static API's but never worked with WebSocket before. Thanks for your help!There is a large a

Counting users on horizontal servers

I have multiple servers scaled horizontally using a redisstore. I've got rooms setup effectively and am successfully able to broadcast to rooms across servers, etc. Now I'm trying to build a status page and what I'm failing on figuring out

Is there a reminder for the io.connect () method in Socket.IO?

Is there any callback for the io.connect() method on the client side? I would like to print some text about connection failure, otherwise proceed normally with the site's socket interactions.Sure, checkout the documentation for Socket.IO-client with

Issuing a Backbone.js template via

BASIC QUESTION I am trying to send an object through socket.emit() but the object is not being fully sent. I may just be misunderstanding how to do this, but here's the example: console.log(object) RESULTS IN { length: 8, models: [ { attributes: [Obj

How to use Websockets with Pyramid and

I'm trying to create a simple WebSocket application using Pyramid and frameworks. Server-side code: from pyramid.response import Response from import SocketIOContext, socketio_manage import gevent def includeme(config):

Security in NowJS

I found NowJS and at the first sight, it looked very cool. I played around with the tutorials and it worked well. Now I'm asking myself: How safe is this? Isn't it possible to inject XSS? The security issue is the biggest obstacle to use it in my app 0.7 can not call broadcast.send?

in 0.6, i have following example code: var io = require('/usr/lib/node_modules/'); var server = http.createServer(function(req,res){ var path = url.parse(req.url).pathname; switch( path ){ .... //core codes socket.broadcast(data);

nodejs, expressjs serving PHP files

Ok I've been playing around with nodejs, expressjs and to create some applications. But now im coming to the stage where i want to take things a bit further. I have noticed a few node apps using PHP for twitter auth on their client side. Wh