官术网_书友最值得收藏!

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
主站蜘蛛池模板: 柘城县| 东平县| 湾仔区| 彰化市| 离岛区| 丹凤县| 航空| 东阿县| 平果县| 万州区| 高要市| 秦皇岛市| 精河县| 凤冈县| 德格县| 明溪县| 台中市| 长岛县| 竹北市| 浦江县| 金乡县| 南开区| 洛阳市| 城固县| 濮阳县| 长顺县| 浠水县| 通海县| 博客| 阜新市| 东源县| 广安市| 读书| 沁源县| 东海县| 宁陕县| 南投县| 那曲县| 渭源县| 股票| 大埔区|