Answer the question
In order to leave comments, you need to log in
Difference between Socket,WebSocket,HTTP (in simple terms)?
Are there any other mechanisms for working with the server and which of them should be preferred, when and why to use, and which ones are either rarely used or not used at all?
Answer the question
In order to leave comments, you need to log in
The socket sends a binary stream. All interaction is up to you. Web socket is the same binary serializer but with a bunch of top-level wrappers. Http is a simple text protocol. When to use http to receive data, web socket if you need a fast and stable connection. It's just that the socket is even faster, perhaps for games and all sorts of stock tickers. But consider the specifics of mobile phones, all permanent connections eat up the battery, and even the system can kill your stream at any time.
These are all network protocols of different levels of the OSI model. Did you learn the basics of networking before you started programming network applications?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question