Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Since Websockets work over TCP and not HTTP, why do we still call it HTTP-push based technology. Apologies if it's a silly question. I am new to client-server architecture.

What I have tried:

why do we still call it HTTP-push based technology
Posted
Updated 13-May-21 9:58am

1 solution

Because push-based means you don't have to poll anything.
In the case of websockets you set up the socket and then it is event-based -- when something changes on the server then the client is automatically "pushed" the changes.
In previous technologies you'd have to set up a client timer (or something like that) and then when the timer fired, you'd have to poll the server to see if there was a change. If there was a change then you'd do something.

With websockets this polling becomes unnecessary because instead the changes at the server are "pushed" to all subscribed clients.
 
Share this answer
 
Comments
Zeke Anderson 14-May-21 3:37am    
Thanks for the reply. I understand with websockets, server is able to push changes to the client when there are updates. My doubt is only related to the terminology "HTTP-push based". Shouldn't websocket be called just as a PUSH-Based technology?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900