I have a Java server that connects with web-browsers through web-sockets, specifically socket.io, specifically this implementation: https://github.com/mrniko/netty-socketio
Now I would like to connect to the same server, not from a web-browser (through Javascript), but from a Node.JS program.
The problem is, in all examples that I found, the Node.JS program is the server, and the clients are always web-browsers.
I tried to use a code similar to the client connection code in node.js:
var io = require('socket.io');
var socket = io.connect("http://localhost:9080");
but got this error:
TypeError: Object #<Object> has no method 'connect'