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

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
主站蜘蛛池模板: 游戏| 石景山区| 都兰县| 鄢陵县| 鄱阳县| 二连浩特市| 巍山| 遂川县| 班玛县| 雷山县| 东阳市| 兴和县| 青田县| 香港| 石门县| 临洮县| 湾仔区| 来凤县| 中宁县| 乌鲁木齐市| 哈巴河县| 来宾市| 曲沃县| 宁波市| 青铜峡市| 象州县| 淮南市| 乐业县| 珲春市| 泽普县| 南靖县| 五华县| 报价| 东源县| 开鲁县| 中牟县| 堆龙德庆县| 中牟县| 云安县| 丰顺县| 德昌县|