O'Reilly logo

TypeScript: Modern JavaScript Development by Ivo Gabe de Wolff, Vilic Vane, Remo H. Jansen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Real-Time Chat

After having written two applications with Angular 2, we will now create one with React. The server part will also be different. Instead of a connectionless server, we will now create a server with a persistent connection. In the previous chapters, the client sent requests to the server and the server responded to them. Now we will write a server that can send information at any time to the client. This is needed to send new chat messages immediately to the client, as shown in the following:

Real-Time Chat

In the chat application, a user can first choose a username and join a chat room. In the room, he/she can send messages and receive ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required