- 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
推薦閱讀
- Learn ECMAScript(Second Edition)
- Python 3.7網絡爬蟲快速入門
- Learning Selenium Testing Tools with Python
- Flask Web開發入門、進階與實戰
- Mastering C# Concurrency
- Xamarin.Forms Projects
- 從學徒到高手:汽車電路識圖、故障檢測與維修技能全圖解
- Android 應用案例開發大全(第3版)
- Active Directory with PowerShell
- 運維前線:一線運維專家的運維方法、技巧與實踐
- HTML+CSS+JavaScript編程入門指南(全2冊)
- Serverless Web Applications with React and Firebase
- Learning ECMAScript 6
- Web前端測試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實踐
- Pandas入門與實戰應用:基于Python的數據分析與處理