Hello!
I think I often post questions while studying various concepts recently. (I think I'm posting too much, and I'm sorry, so if I post it on Facebook's life coding group, it's hard to find it later, so I'm posting it here.))
I was learning the concept of sockets today!
Socket is a two-way communication technology that can solve HTTP's shortcomings. " That's the explanation of most blogs. I read the other contents and understood the socket, but I don't know if it's accurate, so I'm asking you a question!
Um... if I were to express it in a picture
On the left, when sending data using HTTP, http wraps the data and puts a header on it, tcp headers on it, and ip headers on it, wraps it around it, and then majors in data.
The figure on the right shows when the socket was used. However, in order for data to enter into TCP, I understood socket communication as an interface to wrap the data around TCP. The reason why I thought like this is because on a blog, the header of HTTP is large (relatively), but if you use a socket, you can reduce it considerably, so I understood, "Oh, then if you use a socket, you don't use http." And I drew it like that.
Please check if what I understand is correct!
And... It's a very stupid question, but... Are sockets and web sockets different...?
socket
If you use TCP immediately, you can say that you do not use HTTP. It's fast, but it needs to be implemented one by one.
WebSocat was forced to send and receive data only at the request of the client, and to improve this, it also provides aSocat in the web environment from HTML5. It allows you to send data from the server to the client like a regular socket, creating a more dynamic web environment
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
583 PHP ssh2_scp_send fails to send files as intended
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
919 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.