Skip to content

Instantly share code, notes, and snippets.

@xuru
Created May 21, 2013 21:02
Show Gist options
  • Select an option

  • Save xuru/5623223 to your computer and use it in GitHub Desktop.

Select an option

Save xuru/5623223 to your computer and use it in GitHub Desktop.
socket.io stuff
var io = require('socket.io')
var socket = new io.Socket('0.0.0.0', {port: 4723});
if (socket.connect()) {
socket.on('message', function(data) {
console.log('message', data);
});
socket.on('disconnect', function() {
console.log('disconnected');
});
}
else {
console.log('error');
}
/Users/plaster/rep/appium/node_modules/socket.io/lib/socket.js:139
endpoint: this.namespace.name
^
TypeError: Cannot read property 'name' of undefined
at Socket.setFlags (/Users/plaster/rep/appium/node_modules/socket.io/lib/socket.js:139:31)
at new Socket (/Users/plaster/rep/appium/node_modules/socket.io/lib/socket.js:45:8)
at Object.<anonymous> (/Users/plaster/rep/appium/test.js:3:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment