Grokking Node.js
0% completed
Introduction to WebSockets and Real-Time Communication
An HTTP server can only answer. A browser asks for a page, the server sends it, and the exchange is over; the server has no way to send the browser anything until the browser asks again. A chat app built this way cannot show ben's new message on ana's screen when ben sends it. Ana's browser has to ask, again and again, "anything new?"
A WebSocket removes that limit. It is a single connection that stays open after it is set up, and both sides can send a message over it at any moment
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%