O'Reilly logo

Socket.IO Cookbook by Tyson Cadenhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a simple chat room

A basic chat room application is one of the most widely used demos. This shows off Socket.IO or even web sockets in a more general sense. The reason for this is that it immediately gives the business case for Socket.IO in a way that is easy to follow and digest.

Building a basic chat room with Socket.IO is neither terribly difficult or complex. This is the sort of application that Socket.IO was designed for.

When we have completed our chat application, it will look something similar to the following screenshot:

Creating a simple chat room

Getting ready

For this recipe, we will use jQuery for simple DOM manipulation and Bootstrap for styling purposes. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required