Socket IO

Posted on March 9, 2012


Socket IO is built on HTML5 websocket technology to allow real time cross platform applications (ie applications to run in any browser). Socket IO is designed to reduce latency between client and server. The documentation is available online at:

A useful article on Websockets and Socket.IO is available online at:
For the Agricultural Network Project, Socket.IO was installed on top of NodeJs to allow communication between FrontlineSMS and a webpage.

To install Socket.IO in Mac OSX Snow Leopard, type the following command in the terminal:

$ npm install

To install Socket.IO client, type the following command in the terminal:

$ npm install

The next step would be to save the example server (available at: as serve.js using a text editor such as Textmate or J-edit.

The server can then be started in the terminal by navigating to the url and typing in the command:

$ node server.js

If there are any error messages thrown you can try moving the folder into the nodes_modules folder.

Screenshot shows the server invoked and running:

Also see post on Websockets: and post on NodeJs:



Socket io how o use –