- Building Scalable Apps with Redis and Node.js
- Joshua Johanan
- 149字
- 2021-08-05 17:49:04
Chapter 2. Extending Our Development with Socket.IO
In the last chapter, we built a simple web application that can serve HTML pages. Let's add some more functionality to our application. We have to build a chat app, so we will need some sort of real-time event framework. Luckily for us, there is Socket.IO, which will provide us with this real-time communication. Socket.IO fits right into the entire evented nature of Node.js. The whole paradigm of Socket.IO is completely different from using a web server. Socket.IO uses WebSockets to create a connection between the server and client. You will need to understand all this to get Socket.IO to do what you want it to. In this chapter, we will cover the following topics:
- Sending and receiving events
- Creating rooms to divide users
- Adding and reading data from sessions
- Authenticating connections
- Integrating Socket.IO with what we have built already
推薦閱讀
- 零基礎搭建量化投資系統:以Python為工具
- PyQt從入門到精通
- DevOps入門與實踐
- C語言程序設計教程(第2版)
- C語言程序設計
- 精通API架構:設計、運維與演進
- 深度強化學習算法與實踐:基于PyTorch的實現
- Babylon.js Essentials
- Maker基地嘉年華:玩轉樂動魔盒學Scratch
- Web程序設計:ASP.NET(第2版)
- Elasticsearch Blueprints
- Android 游戲開發大全(第二版)
- Bitcoin Essentials
- Google Maps JavaScript API Cookbook
- ASP.NET Core 2 High Performance(Second Edition)