Exception: ReferenceError: io is not defined

I am trying create application for chatting between two or multiple devices using noob hub (using node.js).

Can we get the numbers of clients join in the channel dynamically so that i can get the status of user whether user is online or offline.

 

Referring link

http://stackoverflow.com/questions/6563885/socket-io-how-do-i-get-a-list-of-connected-sockets-clients

 

After doing same thing as suggested in this link we are getting this error

 

New client: 10.10.100.138:54112 Exception: ReferenceError: io is not defined

 

Can we get the best solution for this scene.?

Thanks in Advance