First we have some dependencies :
express = require 'express' io = require 'socket.io' http = require 'http'
With Express 3.X you have to explicitely use http and create your server :
server = http.createServer app io = io.listen server io.set 'log level', 1 server.listen 80
Now you can manage all your connections :
io.sockets.on 'connection', (socket)-> address = socket.handshake.address client_ip = address.address socket.on 'hello',-> socket.emit 'hello_you', you_are : client_ip