Chapter 1. Wiring It Up

In this chapter, we will cover the following recipes:

  • Creating a Node HTTP server with Socket.IO
  • Creating an Express server with Socket.IO
  • Using Socket.IO as a cross-browser WebSocket
  • Debugging on the client
  • Debugging on the server

Introduction

Socket.IO is a powerful tool for creating real-time applications with bidirectional communication between the server side and the client side. It leverages the power of WebSockets along with several fallbacks, including JSON long polling and JSONP long polling through a single unified API. It can be used to create bidirectional interactions, such as real-time dashboards, chat applications, and multiplayer games.

In my previous jobs, I created several real-time JavaScript dashboards predating ...

Get Socket.IO Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.