Joke Collection Website - Mood Talk - Can anyone tell me the difference between node.js net.socket and socket.io?
Can anyone tell me the difference between node.js net.socket and socket.io?
socket.io is an implementation of the WebSocket protocol. You can use it to perform websocket communication. This is the application layer.
node.js net.socket is the system socket interface. Use it to You can operate Linux sockets, which are the transport layer
The websocket protocol essentially uses system sockets. It introduces sockets into http communication, that is, it does not use port 80 for http communication.
Its purpose is to establish a full-duplex connection, which can be used to solve the problem of the server client maintaining a long connection.
Socket.io is just an implementation of the websocket protocol. In addition, HTML5 also defines a corresponding API for websocket, which is implemented by client programs such as browsers. In this way, the top-level web application can directly use websocket to connect.
- Previous article:Cold dew on aestheticism
- Next article:A word to comfort a sad girlfriend.
- Related articles
- Can I change my Android phone to iPhone? Release space, talk about showing iPhone.
- I love you to the point of breaking my heart but I have no regrets and will always keep you in my heart. What song is it?
- Sentences about mood phrases and feelings about life (selected 1 1 sentence)
- What's the difference between pp and pe plastic pipes? Who can tell me?
- What make-up products are worth buying in MAC brand?
- How to send a circle of friends in Wuhan tourism?
- How to delete the content sent by friends circle before?
- Clothes 80, 85, 90, 95 are, S, M, L, which size is it?
- Unhappy QQ space mood, you may find that it is not as beautiful as you think.
- Sigh the power of beauty, talk about that sentence, and talk about it in a circle of friends who laugh at themselves after using beauty.